[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

benjamin.poulain at nokia.com benjamin.poulain at nokia.com
Fri Jan 21 15:17:13 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit da4d7c45a09fd0a9b7cebdf62e9bd7fe7181e3c1
Author: benjamin.poulain at nokia.com <benjamin.poulain at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 10 20:30:14 2011 +0000

    2011-01-10  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Navigator.cookiesEnabled return true for Qt even if there is no cookie jar
            https://bugs.webkit.org/show_bug.cgi?id=52081
    
            Test for the availability of cookie jar to return if cookies are enabled or not.
    
            * platform/qt/CookieJarQt.cpp:
            (WebCore::cookiesEnabled):
    2011-01-10  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Navigator.cookiesEnabled return true for Qt even if there is no cookie jar
            https://bugs.webkit.org/show_bug.cgi?id=52081
    
            Add an autotest for checking the result of Navigator.cookiesEnabled depending
            on the status of the cookie jar.
    
            * tests/qwebpage/tst_qwebpage.cpp:
            (tst_QWebPage::navigatorCookieEnabled):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75411 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 16528d9..0712b5b 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-10  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Navigator.cookiesEnabled return true for Qt even if there is no cookie jar
+        https://bugs.webkit.org/show_bug.cgi?id=52081
+
+        Test for the availability of cookie jar to return if cookies are enabled or not.
+
+        * platform/qt/CookieJarQt.cpp:
+        (WebCore::cookiesEnabled):
+
 2011-01-10  W. James MacLean  <wjmaclean at chromium.org>
 
         Reviewed by Kenneth Russell.
diff --git a/Source/WebCore/platform/qt/CookieJarQt.cpp b/Source/WebCore/platform/qt/CookieJarQt.cpp
index 53e39b9..b7ff5d1 100644
--- a/Source/WebCore/platform/qt/CookieJarQt.cpp
+++ b/Source/WebCore/platform/qt/CookieJarQt.cpp
@@ -114,7 +114,10 @@ String cookieRequestHeaderFieldValue(const Document* document, const KURL &url)
 
 bool cookiesEnabled(const Document* document)
 {
-    return !!networkAccessManager(document);
+    if (QNetworkAccessManager* manager = networkAccessManager(document))
+        return !!manager->cookieJar();
+
+    return false;
 }
 
 bool getRawCookies(const Document*, const KURL&, Vector<Cookie>& rawCookies)
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index d28c394..ce716d4 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-10  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Navigator.cookiesEnabled return true for Qt even if there is no cookie jar
+        https://bugs.webkit.org/show_bug.cgi?id=52081
+
+        Add an autotest for checking the result of Navigator.cookiesEnabled depending
+        on the status of the cookie jar.
+
+        * tests/qwebpage/tst_qwebpage.cpp:
+        (tst_QWebPage::navigatorCookieEnabled):
+
 2011-01-09  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r75337.
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index b71f665..d4eed21 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -34,6 +34,7 @@
 #include <qgraphicsscene.h>
 #include <qgraphicsview.h>
 #include <qgraphicswebview.h>
+#include <qnetworkcookiejar.h>
 #include <qnetworkrequest.h>
 #include <qwebdatabase.h>
 #include <qwebelement.h>
@@ -131,6 +132,7 @@ private slots:
     void supportedContentType();
     void infiniteLoopJS();
     void networkAccessManagerOnDifferentThread();
+    void navigatorCookieEnabled();
 
 #ifdef Q_OS_MAC
     void macCopyUnicodeToClipboard();
@@ -2710,6 +2712,17 @@ void tst_QWebPage::networkAccessManagerOnDifferentThread()
     QCOMPARE(m_page->mainFrame()->childFrames()[0]->url(), QUrl("qrc:///resources/frame_a.html"));
 }
 
+void tst_QWebPage::navigatorCookieEnabled()
+{
+    m_page->networkAccessManager()->setCookieJar(0);
+    QVERIFY(!m_page->networkAccessManager()->cookieJar());
+    QVERIFY(!m_page->mainFrame()->evaluateJavaScript("navigator.cookieEnabled").toBool());
+
+    m_page->networkAccessManager()->setCookieJar(new QNetworkCookieJar());
+    QVERIFY(m_page->networkAccessManager()->cookieJar());
+    QVERIFY(m_page->mainFrame()->evaluateJavaScript("navigator.cookieEnabled").toBool());
+}
+
 #ifdef Q_OS_MAC
 void tst_QWebPage::macCopyUnicodeToClipboard()
 {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list