diff options
Diffstat (limited to 'tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp')
-rw-r--r-- | tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index f4c4429..01b9c0c 100644 --- a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -304,6 +304,21 @@ void tst_QNetworkCookieJar::cookiesForUrl_data() QTest::newRow("path-match-2") << allCookies << "http://nokia.com/web/" << result; QTest::newRow("path-match-3") << allCookies << "http://nokia.com/web/content" << result; + // secure cookies + allCookies.clear(); + result.clear(); + QNetworkCookie secureCookie; + secureCookie.setName("a"); + secureCookie.setPath("/web"); + secureCookie.setDomain(".nokia.com"); + 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; + 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; + } void tst_QNetworkCookieJar::cookiesForUrl() |