diff options
Diffstat (limited to 'tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp')
-rw-r--r-- | tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp index 3c4ddd4..94857d7 100644 --- a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp +++ b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp @@ -234,7 +234,7 @@ void tst_QNetworkCookie::parseSingleCookie_data() QTest::newRow("path-with-utf8-2") << "a=b;path=/R%C3%A9sum%C3%A9" << cookie; cookie.setPath(QString()); - cookie.setDomain(".qt.nokia.com"); + cookie.setDomain("qt.nokia.com"); QTest::newRow("plain-domain1") << "a=b;domain=qt.nokia.com" << cookie; QTest::newRow("plain-domain2") << "a=b; domain=qt.nokia.com " << cookie; QTest::newRow("plain-domain3") << "a=b;domain=QT.NOKIA.COM" << cookie; @@ -247,32 +247,25 @@ void tst_QNetworkCookie::parseSingleCookie_data() QTest::newRow("dot-domain4") << "a=b; Domain = .QT.NOKIA.COM" << cookie; cookie.setDomain(QString::fromUtf8(".d\303\270gn\303\245pent.troll.no")); - QTest::newRow("idn-domain1") << "a=b;domain=xn--dgnpent-gxa2o.troll.no" << cookie; - QTest::newRow("idn-domain2") << "a=b;domain=d\303\270gn\303\245pent.troll.no" << cookie; - QTest::newRow("idn-domain3") << "a=b;domain=XN--DGNPENT-GXA2O.TROLL.NO" << cookie; - QTest::newRow("idn-domain4") << "a=b;domain=D\303\230GN\303\205PENT.troll.NO" << cookie; - QTest::newRow("idn-domain5") << "a=b;domain = D\303\230GN\303\205PENT.troll.NO" << cookie; - - cookie.setDomain(QString::fromUtf8(".d\303\270gn\303\245pent.troll.no")); - QTest::newRow("dot-idn-domain1") << "a=b;domain=.xn--dgnpent-gxa2o.troll.no" << cookie; - QTest::newRow("dot-idn-domain2") << "a=b;domain=.d\303\270gn\303\245pent.troll.no" << cookie; - QTest::newRow("dot-idn-domain3") << "a=b;domain=.XN--DGNPENT-GXA2O.TROLL.NO" << cookie; - QTest::newRow("dot-idn-domain4") << "a=b;domain=.D\303\230GN\303\205PENT.troll.NO" << cookie; + QTest::newRow("idn-domain1") << "a=b;domain=.xn--dgnpent-gxa2o.troll.no" << cookie; + QTest::newRow("idn-domain2") << "a=b;domain=.d\303\270gn\303\245pent.troll.no" << cookie; + QTest::newRow("idn-domain3") << "a=b;domain=.XN--DGNPENT-GXA2O.TROLL.NO" << cookie; + QTest::newRow("idn-domain4") << "a=b;domain=.D\303\230GN\303\205PENT.troll.NO" << cookie; cookie.setDomain(".qt.nokia.com"); cookie.setPath("/"); - QTest::newRow("two-fields") << "a=b;domain=qt.nokia.com;path=/" << cookie; - QTest::newRow("two-fields2") << "a=b; domain=qt.nokia.com; path=/" << cookie; - QTest::newRow("two-fields3") << "a=b; domain=qt.nokia.com ; path=/ " << cookie; - QTest::newRow("two-fields4") << "a=b;path=/; domain=qt.nokia.com" << cookie; - QTest::newRow("two-fields5") << "a=b; path=/ ; domain=qt.nokia.com" << cookie; - QTest::newRow("two-fields6") << "a=b; path= / ; domain =qt.nokia.com" << cookie; + QTest::newRow("two-fields") << "a=b;domain=.qt.nokia.com;path=/" << cookie; + QTest::newRow("two-fields2") << "a=b; domain=.qt.nokia.com; path=/" << cookie; + QTest::newRow("two-fields3") << "a=b; domain=.qt.nokia.com ; path=/ " << cookie; + QTest::newRow("two-fields4") << "a=b;path=/; domain=.qt.nokia.com" << cookie; + QTest::newRow("two-fields5") << "a=b; path=/ ; domain=.qt.nokia.com" << cookie; + QTest::newRow("two-fields6") << "a=b; path= / ; domain =.qt.nokia.com" << cookie; cookie.setSecure(true); - QTest::newRow("three-fields") << "a=b;domain=qt.nokia.com;path=/;secure" << cookie; - QTest::newRow("three-fields2") << "a=b;secure;path=/;domain=qt.nokia.com" << cookie; - QTest::newRow("three-fields3") << "a=b;secure;domain=qt.nokia.com; path=/" << cookie; - QTest::newRow("three-fields4") << "a = b;secure;domain=qt.nokia.com; path=/" << cookie; + QTest::newRow("three-fields") << "a=b;domain=.qt.nokia.com;path=/;secure" << cookie; + QTest::newRow("three-fields2") << "a=b;secure;path=/;domain=.qt.nokia.com" << cookie; + QTest::newRow("three-fields3") << "a=b;secure;domain=.qt.nokia.com; path=/" << cookie; + QTest::newRow("three-fields4") << "a = b;secure;domain=.qt.nokia.com; path=/" << cookie; cookie = QNetworkCookie(); cookie.setName("a"); @@ -664,7 +657,7 @@ void tst_QNetworkCookie::parseMultipleCookies_data() cookie.setName("baz"); cookie.setDomain(".qt.nokia.com"); list.prepend(cookie); - QTest::newRow("complex-2") << "baz=bar; path=/; domain=qt.nokia.com, c=d,a=,foo=bar; path=/" << list; + QTest::newRow("complex-2") << "baz=bar; path=/; domain=.qt.nokia.com, c=d,a=,foo=bar; path=/" << list; // cookies obtained from the network: cookie = QNetworkCookie("id", "51706646077999719"); |