summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnetworkcookiejar
diff options
context:
space:
mode:
authorRobert Hogan <robert@roberthogan.net>2011-05-24 09:04:27 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2011-05-24 09:47:16 (GMT)
commit154402f56dcf8303a6ce601a52215226af8d31ba (patch)
treea3a84d06e6c80812b55304031ba605d6aea46c63 /tests/auto/qnetworkcookiejar
parent83c37059df7f23be482d4ecb2c54603a3665a33d (diff)
downloadQt-154402f56dcf8303a6ce601a52215226af8d31ba.zip
Qt-154402f56dcf8303a6ce601a52215226af8d31ba.tar.gz
Qt-154402f56dcf8303a6ce601a52215226af8d31ba.tar.bz2
Add QUrl::topLevelDomain() and move TLD table from QtNetwork to QtCore
Move Qt's copy of the Mozilla public suffix list from QtNetwork to QtCore and use it to expose a new API function QUrl::topLevelDomain(). This function returns the section of the url that is a registrar-controlled top level domain. QtCore now exports a couple of functions to the other Qt modules: qTopLevelDomain, a helper function for QUrl::topLevelDomain(); and qIsEffectiveTLD(), a helper function for QNetworkCookeieJar. The motivation for this new API is to allow QtWebKit implement a Third-Party Cookie blocking policy. For this QtWebKit needs to know the element of the url that is the registry-controlled TLD. Without this knowledge it would end up blocking third-party cookies per host rather than per registry-controlled domain. See also https://bugs.webkit.org/show_bug.cgi?id=45455 Merge-request: 1205 Task-number: QTBUG-13601 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Diffstat (limited to 'tests/auto/qnetworkcookiejar')
-rw-r--r--tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
index 178f6d8..1f7c269 100644
--- a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
+++ b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp
@@ -42,7 +42,7 @@
#include <QtTest/QtTest>
#include <QtNetwork/QNetworkCookieJar>
-#include "private/qnetworkcookiejar_p.h"
+#include "private/qtldurl_p.h"
class tst_QNetworkCookieJar: public QObject
{
@@ -438,7 +438,7 @@ void tst_QNetworkCookieJar::effectiveTLDs()
#endif
QFETCH(QString, domain);
QFETCH(bool, isTLD);
- QCOMPARE(QNetworkCookieJarPrivate::isEffectiveTLD(domain), isTLD);
+ QCOMPARE(qIsEffectiveTLD(domain), isTLD);
}
QTEST_MAIN(tst_QNetworkCookieJar)