summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-13 11:58:07 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-14 14:24:57 +0100
commite65cd6f3794e12e6bc5c2ee985eae8e70ff5f333 (patch)
tree8965835c375422d63b2ccfa927b31a56e64bda1d /tests/auto/network/access
parentd1ee7189553e13337b198fe4ba66d79fb7a7f41d (diff)
parente95a758236cf2c68e33da4ddb62bff4fe8d9dd8b (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
Diffstat (limited to 'tests/auto/network/access')
-rw-r--r--tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp52
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp80
-rw-r--r--tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp2
3 files changed, 67 insertions, 67 deletions
diff --git a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
index 469a6a6c89..ad6420da17 100644
--- a/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
+++ b/tests/auto/network/access/qnetworkcookie/tst_qnetworkcookie.cpp
@@ -256,17 +256,17 @@ 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");
- 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;
- QTest::newRow("plain-domain4") << "a=b;DOMAIN = QT.NOKIA.COM" << cookie;
-
- cookie.setDomain(".qt.nokia.com");
- QTest::newRow("dot-domain1") << "a=b;domain=.qt.nokia.com" << cookie;
- QTest::newRow("dot-domain2") << "a=b; domain=.qt.nokia.com" << cookie;
- QTest::newRow("dot-domain3") << "a=b; domain=.QT.NOKIA.COM" << cookie;
- QTest::newRow("dot-domain4") << "a=b; Domain = .QT.NOKIA.COM" << cookie;
+ cookie.setDomain("qt-project.org");
+ QTest::newRow("plain-domain1") << "a=b;domain=qt-project.org" << cookie;
+ QTest::newRow("plain-domain2") << "a=b; domain=qt-project.org " << cookie;
+ QTest::newRow("plain-domain3") << "a=b;domain=QT-PROJECT.ORG" << cookie;
+ QTest::newRow("plain-domain4") << "a=b;DOMAIN = QT-PROJECT.ORG" << cookie;
+
+ cookie.setDomain(".qt-project.org");
+ QTest::newRow("dot-domain1") << "a=b;domain=.qt-project.org" << cookie;
+ QTest::newRow("dot-domain2") << "a=b; domain=.qt-project.org" << cookie;
+ QTest::newRow("dot-domain3") << "a=b; domain=.QT-PROJECT.ORG" << cookie;
+ QTest::newRow("dot-domain4") << "a=b; Domain = .QT-PROJECT.ORG" << 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;
@@ -274,20 +274,20 @@ void tst_QNetworkCookie::parseSingleCookie_data()
QTest::newRow("idn-domain3") << "a=b;domain=.XN--DGNPENT-GXA2O.TROLL.NO" << cookie;
QTest::newRow("idn-domain4") << QString::fromUtf8("a=b;domain=.D\303\230GN\303\205PENT.troll.NO") << cookie;
- cookie.setDomain(".qt.nokia.com");
+ cookie.setDomain(".qt-project.org");
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-project.org;path=/" << cookie;
+ QTest::newRow("two-fields2") << "a=b; domain=.qt-project.org; path=/" << cookie;
+ QTest::newRow("two-fields3") << "a=b; domain=.qt-project.org ; path=/ " << cookie;
+ QTest::newRow("two-fields4") << "a=b;path=/; domain=.qt-project.org" << cookie;
+ QTest::newRow("two-fields5") << "a=b; path=/ ; domain=.qt-project.org" << cookie;
+ QTest::newRow("two-fields6") << "a=b; path= / ; domain =.qt-project.org" << 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-project.org;path=/;secure" << cookie;
+ QTest::newRow("three-fields2") << "a=b;secure;path=/;domain=.qt-project.org" << cookie;
+ QTest::newRow("three-fields3") << "a=b;secure;domain=.qt-project.org; path=/" << cookie;
+ QTest::newRow("three-fields4") << "a = b;secure;domain=.qt-project.org; path=/" << cookie;
cookie = QNetworkCookie();
cookie.setName("a");
@@ -468,7 +468,7 @@ void tst_QNetworkCookie::parseSingleCookie_data()
cookie.setExpirationDate(QDateTime(QDate(2010, 2, 3), QTime(0, 0), Qt::UTC));
QTest::newRow("ambiguousd-2") << "a=b;expires=2/3/10 0:0" << cookie;
- // FYI If you try these in Firefox it wont set a cookie for the following two string
+ // FYI If you try these in Firefox it won't set a cookie for the following two string
// because 03 is turned into the year at which point it is expired
cookie.setExpirationDate(QDateTime(QDate(2003, 2, 10), QTime(0, 0), Qt::UTC));
QTest::newRow("ambiguousd-3") << "a=b;expires=2/10/3 0:0" << cookie;
@@ -575,9 +575,9 @@ void tst_QNetworkCookie::parseSingleCookie_data()
QTest::newRow("expires+path") << "a=b; expires=Wed, 09-Nov-1999 23:12:40 GMT; path=/" << cookie;
QTest::newRow("path+expires") << "a=b; path=/;expires=Wed, 09-Nov-1999 23:12:40 GMT " << cookie;
- cookie.setDomain(".qt.nokia.com");
- QTest::newRow("full") << "a=b; domain=.qt.nokia.com;expires=Wed, 09-Nov-1999 23:12:40 GMT;path=/" << cookie;
- QTest::newRow("full2") << "a=b;path=/; expires=Wed, 09-Nov-1999 23:12:40 GMT ;domain=.qt.nokia.com" << cookie;
+ cookie.setDomain(".qt-project.org");
+ QTest::newRow("full") << "a=b; domain=.qt-project.org;expires=Wed, 09-Nov-1999 23:12:40 GMT;path=/" << cookie;
+ QTest::newRow("full2") << "a=b;path=/; expires=Wed, 09-Nov-1999 23:12:40 GMT ;domain=.qt-project.org" << cookie;
// cookies obtained from the network:
cookie = QNetworkCookie("__siteid", "1");
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 821c633179..4ee4b67ec0 100644
--- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -275,74 +275,74 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
QNetworkCookie cookie;
cookie.setName("a");
cookie.setPath("/web");
- cookie.setDomain(".nokia.com");
+ cookie.setDomain(".qt-project.org");
allCookies += cookie;
QTest::newRow("no-match-1") << allCookies << "http://foo.bar/" << result;
QTest::newRow("no-match-2") << allCookies << "http://foo.bar/web" << result;
QTest::newRow("no-match-3") << allCookies << "http://foo.bar/web/wiki" << result;
- QTest::newRow("no-match-4") << allCookies << "http://nokia.com" << result;
- QTest::newRow("no-match-5") << allCookies << "http://qt.nokia.com" << result;
- QTest::newRow("no-match-6") << allCookies << "http://nokia.com/webinar" << result;
- QTest::newRow("no-match-7") << allCookies << "http://qt.nokia.com/webinar" << result;
- QTest::newRow("no-match-8") << allCookies << "http://qt.nokia.com./web" << result;
- QTest::newRow("no-match-9") << allCookies << "http://nokia.com./web" << result;
+ QTest::newRow("no-match-4") << allCookies << "http://qt-project.org" << result;
+ QTest::newRow("no-match-5") << allCookies << "http://qt-project.org" << result;
+ QTest::newRow("no-match-6") << allCookies << "http://qt-project.org/webinar" << result;
+ QTest::newRow("no-match-7") << allCookies << "http://qt-project.org/webinar" << result;
+ QTest::newRow("no-match-8") << allCookies << "http://qt-project.org./web" << result;
+ QTest::newRow("no-match-9") << allCookies << "http://qt-project.org./web" << result;
result = allCookies;
- QTest::newRow("match-1") << allCookies << "http://nokia.com/web" << result;
- QTest::newRow("match-2") << allCookies << "http://nokia.com/web/" << result;
- QTest::newRow("match-3") << allCookies << "http://nokia.com/web/content" << result;
- QTest::newRow("match-4") << allCookies << "http://qt.nokia.com/web" << result;
- QTest::newRow("match-5") << allCookies << "http://qt.nokia.com/web/" << result;
- QTest::newRow("match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
+ QTest::newRow("match-1") << allCookies << "http://qt-project.org/web" << result;
+ QTest::newRow("match-2") << allCookies << "http://qt-project.org/web/" << result;
+ QTest::newRow("match-3") << allCookies << "http://qt-project.org/web/content" << result;
+ QTest::newRow("match-4") << allCookies << "http://qt-project.org/web" << result;
+ QTest::newRow("match-5") << allCookies << "http://qt-project.org/web/" << result;
+ QTest::newRow("match-6") << allCookies << "http://qt-project.org/web/content" << result;
cookie.setPath("/web/wiki");
allCookies += cookie;
// exact same results as before:
- QTest::newRow("one-match-1") << allCookies << "http://nokia.com/web" << result;
- QTest::newRow("one-match-2") << allCookies << "http://nokia.com/web/" << result;
- QTest::newRow("one-match-3") << allCookies << "http://nokia.com/web/content" << result;
- QTest::newRow("one-match-4") << allCookies << "http://qt.nokia.com/web" << result;
- QTest::newRow("one-match-5") << allCookies << "http://qt.nokia.com/web/" << result;
- QTest::newRow("one-match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
+ QTest::newRow("one-match-1") << allCookies << "http://qt-project.org/web" << result;
+ QTest::newRow("one-match-2") << allCookies << "http://qt-project.org/web/" << result;
+ QTest::newRow("one-match-3") << allCookies << "http://qt-project.org/web/content" << result;
+ QTest::newRow("one-match-4") << allCookies << "http://qt-project.org/web" << result;
+ QTest::newRow("one-match-5") << allCookies << "http://qt-project.org/web/" << result;
+ QTest::newRow("one-match-6") << allCookies << "http://qt-project.org/web/content" << result;
result.prepend(cookie); // longer path, it must match first
- QTest::newRow("two-matches-1") << allCookies << "http://nokia.com/web/wiki" << result;
- QTest::newRow("two-matches-2") << allCookies << "http://qt.nokia.com/web/wiki" << result;
+ QTest::newRow("two-matches-1") << allCookies << "http://qt-project.org/web/wiki" << result;
+ QTest::newRow("two-matches-2") << allCookies << "http://qt-project.org/web/wiki" << result;
// invert the order;
allCookies.clear();
allCookies << result.at(1) << result.at(0);
- QTest::newRow("two-matches-3") << allCookies << "http://nokia.com/web/wiki" << result;
- QTest::newRow("two-matches-4") << allCookies << "http://qt.nokia.com/web/wiki" << result;
+ QTest::newRow("two-matches-3") << allCookies << "http://qt-project.org/web/wiki" << result;
+ QTest::newRow("two-matches-4") << allCookies << "http://qt-project.org/web/wiki" << result;
// expired cookie
allCookies.clear();
cookie.setExpirationDate(QDateTime::fromString("09-Nov-1999", "dd-MMM-yyyy"));
allCookies += cookie;
result.clear();
- QTest::newRow("exp-match-1") << allCookies << "http://nokia.com/web" << result;
- QTest::newRow("exp-match-2") << allCookies << "http://nokia.com/web/" << result;
- QTest::newRow("exp-match-3") << allCookies << "http://nokia.com/web/content" << result;
- QTest::newRow("exp-match-4") << allCookies << "http://qt.nokia.com/web" << result;
- QTest::newRow("exp-match-5") << allCookies << "http://qt.nokia.com/web/" << result;
- QTest::newRow("exp-match-6") << allCookies << "http://qt.nokia.com/web/content" << result;
+ QTest::newRow("exp-match-1") << allCookies << "http://qt-project.org/web" << result;
+ QTest::newRow("exp-match-2") << allCookies << "http://qt-project.org/web/" << result;
+ QTest::newRow("exp-match-3") << allCookies << "http://qt-project.org/web/content" << result;
+ QTest::newRow("exp-match-4") << allCookies << "http://qt-project.org/web" << result;
+ QTest::newRow("exp-match-5") << allCookies << "http://qt-project.org/web/" << result;
+ QTest::newRow("exp-match-6") << allCookies << "http://qt-project.org/web/content" << result;
// path matching
allCookies.clear();
QNetworkCookie anotherCookie;
anotherCookie.setName("a");
anotherCookie.setPath("/web");
- anotherCookie.setDomain(".nokia.com");
+ anotherCookie.setDomain(".qt-project.org");
allCookies += anotherCookie;
result.clear();
- QTest::newRow("path-unmatch-1") << allCookies << "http://nokia.com/" << result;
- QTest::newRow("path-unmatch-2") << allCookies << "http://nokia.com/something/else" << result;
+ QTest::newRow("path-unmatch-1") << allCookies << "http://qt-project.org/" << result;
+ QTest::newRow("path-unmatch-2") << allCookies << "http://qt-project.org/something/else" << result;
result += anotherCookie;
- QTest::newRow("path-match-1") << allCookies << "http://nokia.com/web" << result;
- QTest::newRow("path-match-2") << allCookies << "http://nokia.com/web/" << result;
- QTest::newRow("path-match-3") << allCookies << "http://nokia.com/web/content" << result;
+ QTest::newRow("path-match-1") << allCookies << "http://qt-project.org/web" << result;
+ QTest::newRow("path-match-2") << allCookies << "http://qt-project.org/web/" << result;
+ QTest::newRow("path-match-3") << allCookies << "http://qt-project.org/web/content" << result;
// secure cookies
allCookies.clear();
@@ -350,14 +350,14 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
QNetworkCookie secureCookie;
secureCookie.setName("a");
secureCookie.setPath("/web");
- secureCookie.setDomain(".nokia.com");
+ secureCookie.setDomain(".qt-project.org");
secureCookie.setSecure(true);
allCookies += secureCookie;
- QTest::newRow("no-match-secure-1") << allCookies << "http://nokia.com/web" << result;
- QTest::newRow("no-match-secure-2") << allCookies << "http://qt.nokia.com/web" << result;
+ QTest::newRow("no-match-secure-1") << allCookies << "http://qt-project.org/web" << result;
+ QTest::newRow("no-match-secure-2") << allCookies << "http://qt-project.org/web" << result;
result += secureCookie;
- QTest::newRow("match-secure-1") << allCookies << "https://nokia.com/web" << result;
- QTest::newRow("match-secure-2") << allCookies << "https://qt.nokia.com/web" << result;
+ QTest::newRow("match-secure-1") << allCookies << "https://qt-project.org/web" << result;
+ QTest::newRow("match-secure-2") << allCookies << "https://qt-project.org/web" << result;
// domain ending in .
allCookies.clear();
diff --git a/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp b/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
index de17511423..600a1770b7 100644
--- a/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
+++ b/tests/auto/network/access/qnetworkrequest/tst_qnetworkrequest.cpp
@@ -102,7 +102,7 @@ void tst_QNetworkRequest::ctor_data()
QTest::newRow("nothing") << QUrl();
QTest::newRow("empty") << QUrl();
- QTest::newRow("http") << QUrl("http://qt.nokia.com");
+ QTest::newRow("http") << QUrl("http://qt-project.org");
}
void tst_QNetworkRequest::ctor()