2010-01-14 Diego Gonzalez <diego.gonzalez@openbossa.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jan 2010 09:47:23 +0000 (09:47 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jan 2010 09:47:23 +0000 (09:47 +0000)
        Reviewed by Kenneth Rohde Christiansen.

        [Qt] DRT missing setUserStyleSheetLocation and setUserStyleSheetEnabled in LayoutTestController
        https://bugs.webkit.org/show_bug.cgi?id=33617

        * platform/qt/Skipped:
2010-01-14  Diego Gonzalez  <diego.gonzalez@openbossa.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] DRT missing setUserStyleSheetLocation and setUserStyleSheetEnabled in LayoutTestController
        https://bugs.webkit.org/show_bug.cgi?id=33617

        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
        (WebCore::WebPage::resetSettings):
        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
        (LayoutTestController::setUserStyleSheetLocation):
        (LayoutTestController::setUserStyleSheetEnabled):
        * DumpRenderTree/qt/LayoutTestControllerQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53249 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/qt/Skipped
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

index 447bf7d..7a38e4a 100644 (file)
@@ -1,3 +1,12 @@
+2010-01-14  Diego Gonzalez  <diego.gonzalez@openbossa.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] DRT missing setUserStyleSheetLocation and setUserStyleSheetEnabled in LayoutTestController
+        https://bugs.webkit.org/show_bug.cgi?id=33617
+
+        * platform/qt/Skipped:
+
 2010-01-14  James Robinson  <jamesr@chromium.org>
 
         Reviewed by Alexey Proskuryakov.
index 5cd0453..4b1a7c2 100644 (file)
@@ -204,9 +204,6 @@ http/tests/security/isolatedWorld
 http/tests/security/mixedContent
 http/tests/cache/subresource-failover-to-network.html
 
-# Missing layoutTestController.setUserStyleSheetLocation() and layoutTestController.setUserStyleSheetEnabled()
-http/tests/security/local-user-CSS-from-remote.html
-
 # Missing layoutTestController.evaluateInWebInspector()
 # https://bugs.webkit.org/show_bug.cgi?id=33096
 inspector/cookie-resource-match.html
index 3a59bf1..0d942dd 100644 (file)
@@ -1,3 +1,17 @@
+2010-01-14  Diego Gonzalez  <diego.gonzalez@openbossa.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] DRT missing setUserStyleSheetLocation and setUserStyleSheetEnabled in LayoutTestController
+        https://bugs.webkit.org/show_bug.cgi?id=33617
+
+        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+        (WebCore::WebPage::resetSettings):
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::setUserStyleSheetLocation):
+        (LayoutTestController::setUserStyleSheetEnabled):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
 2010-01-13  Adam Barth  <abarth@webkit.org>
 
         Reviewed by Eric Seidel.
index 6367fe3..52939e4 100644 (file)
@@ -171,6 +171,7 @@ void WebPage::resetSettings()
     m_drt->layoutTestController()->setXSSAuditorEnabled(false);
 
     QWebSettings::setMaximumPagesInCache(0); // reset to default
+    settings()->setUserStyleSheetUrl(QUrl()); // reset to default
 }
 
 QWebPage *WebPage::createWindow(QWebPage::WebWindowType)
index e017ee7..c2e097b 100644 (file)
@@ -391,3 +391,16 @@ void LayoutTestController::overridePreference(const QString& name, const QVarian
     else if (name == "WebKitUsesPageCachePreferenceKey")
         QWebSettings::setMaximumPagesInCache(value.toInt());
 }
+
+void LayoutTestController::setUserStyleSheetLocation(const QString& url)
+{
+    m_userStyleSheetLocation = QUrl(url);
+}
+
+void LayoutTestController::setUserStyleSheetEnabled(bool enabled)
+{
+    if (enabled)
+        m_drt->webPage()->settings()->setUserStyleSheetUrl(m_userStyleSheetLocation);
+    else
+        m_drt->webPage()->settings()->setUserStyleSheetUrl(QUrl());
+}
index 4451b7a..cff8474 100644 (file)
@@ -133,6 +133,8 @@ public slots:
 
     void waitForPolicyDelegate();
     void overridePreference(const QString& name, const QVariant& value);
+    void setUserStyleSheetLocation(const QString& url);
+    void setUserStyleSheetEnabled(bool enabled);
 
 private slots:
     void processWork();
@@ -151,6 +153,7 @@ private:
     bool m_handleErrorPages;
     bool m_loadFinished;
 
+    QUrl m_userStyleSheetLocation;
     QBasicTimer m_timeoutTimer;
     QWebFrame* m_topLoadingFrame;
     WebCore::DumpRenderTree* m_drt;