summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-02-28 14:53:42 +0000
committerQt by Nokia <qt-info@nokia.com>2012-02-29 17:46:06 +0100
commit7d5b0e2b042c5f6c3074cd20ba9baf9dfd733203 (patch)
tree4981334512960420e6a75b88423563f4a53ab518 /tests
parent56612a555d2b6e81239860cb457959dc8afdf274 (diff)
network cookies: check "example.com" != "example.com."
Only test code change, we already have the correct behaviour Task-number: QTBUG-20001 Change-Id: I2296f405f47f9c8d15796e69f9d1854063e38d6a Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 0e046ad6f9..5dffe68386 100644
--- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -278,6 +278,8 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
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;
result = allCookies;
QTest::newRow("match-1") << allCookies << "http://nokia.com/web" << result;
@@ -350,6 +352,16 @@ void tst_QNetworkCookieJar::cookiesForUrl_data()
QTest::newRow("match-secure-1") << allCookies << "https://nokia.com/web" << result;
QTest::newRow("match-secure-2") << allCookies << "https://qt.nokia.com/web" << result;
+ // domain ending in .
+ allCookies.clear();
+ result.clear();
+ QNetworkCookie cookieDot;
+ cookieDot.setDomain(".example.com.");
+ cookieDot.setName("a");
+ allCookies += cookieDot;
+ QTest::newRow("no-match-domain-dot") << allCookies << "http://example.com" << result;
+ result += cookieDot;
+ QTest::newRow("match-domain-dot") << allCookies << "http://example.com." << result;
}
void tst_QNetworkCookieJar::cookiesForUrl()