diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 7 | ||||
-rw-r--r-- | tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 3123c42326..ef4325d2ea 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -3389,8 +3389,15 @@ void tst_QUrl::acceptEmptyAuthoritySegments() void tst_QUrl::effectiveTLDs_data() { + // See also: tst_QNetworkCookieJar::setCookiesFromUrl(). + // in tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp QTest::addColumn<QUrl>("domain"); QTest::addColumn<QString>("TLD"); + // TODO: autogenerate test-cases from: + // https://raw.githubusercontent.com/publicsuffix/list/master/tests/test_psl.txt + // checkPublicSuffix(domain, tail) appears in the list if + // either tail is null and domain is public or + // tail is the "registrable" part of domain; i.e. its minimal non-public tail. QTest::newRow("yes0") << QUrl::fromEncoded("http://test.co.uk") << ".co.uk"; QTest::newRow("yes1") << QUrl::fromEncoded("http://test.com") << ".com"; diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index 1ef2c118b9..0924b1e223 100644 --- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -166,6 +166,10 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data() // 2. anything .ck is an effective TLD ('*.ck'), but 'www.ck' is an exception result.clear(); preset.clear(); + cookie.setDomain(".ck"); + QTest::newRow("effective-tld.ck-denied") << preset << cookie << "http://foo.ck" << result << false; + result.clear(); + preset.clear(); cookie.setDomain(".foo.ck"); result += cookie; QTest::newRow("effective-tld2-accepted2") << preset << cookie << "http://foo.ck" << result << true; |