WebKitTools: Implement the setAllowUniversalAccessFromFileURLs method
authorkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2009 21:01:48 +0000 (21:01 +0000)
committerkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2009 21:01:48 +0000 (21:01 +0000)
for the Qt LayoutTestController.

Reviewed by Adam Treat.

* DumpRenderTree/qt/DumpRenderTree.cpp:
(WebCore::WebPage::resetSettings):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::setAllowUniversalAccessFromFileURLs):
* DumpRenderTree/qt/LayoutTestControllerQt.h:

LayoutTests: Remove test that works after adding setAllowUniversalAccessFromFileURLs
to Qt's version of the LayoutTestController.

Reviewed by Adam Treat.

* platform/qt/Skipped:

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

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

index 37944074f9a342e6885a2447e0c638766cd89628..e35a052d3fb5e049d57e13a94b914681e3ba4db8 100644 (file)
@@ -1,3 +1,12 @@
+2009-12-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
+
+        Reviewed by Adam Treat.
+
+        Remove test that works after adding setAllowUniversalAccessFromFileURLs
+        to Qt's version of the LayoutTestController.
+
+        * platform/qt/Skipped:
+
 2009-12-04  Dirk Schulze  <krit@webkit.org>
 
         Reviewed by Nikolas Zimmermann.
index 7f2e2c3e20e6f7ba1fb89165de5c422318b129c6..5fe287b37eea9e8980792b93efc9ebcf4fe4e3e5 100644 (file)
@@ -224,9 +224,6 @@ 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.setAllowUniversalAccessFromFileURLs()
-fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
-
 # Missing layoutTestController.evaluateInWebInspector()
 inspector/elements-img-tooltip.html
 inspector/elements-panel-selection-on-refresh.html
index 5b633aa25e46f107338b27fd79026f44751318f9..7e439f496abbd33bd245c6b3961e174ecbc6fc84 100644 (file)
@@ -1,3 +1,16 @@
+2009-12-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
+
+        Reviewed by Adam Treat.
+
+        Implement the setAllowUniversalAccessFromFileURLs method
+        for the Qt LayoutTestController.
+
+        * DumpRenderTree/qt/DumpRenderTree.cpp:
+        (WebCore::WebPage::resetSettings):
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::setAllowUniversalAccessFromFileURLs):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
 2009-12-04  Chris Fleizach  <cfleizach@apple.com>
 
         Reviewed by Darin Adler.
index a49be4463ad2ba0258f98648030f3ff697488ab5..ff06dbe9dd8896a6e8b6b990578260a7cbd702a0 100644 (file)
@@ -152,6 +152,7 @@ void WebPage::resetSettings()
     settings()->resetAttribute(QWebSettings::PrivateBrowsingEnabled);
     settings()->resetAttribute(QWebSettings::LinksIncludedInFocusChain);
     settings()->resetAttribute(QWebSettings::OfflineWebApplicationCacheEnabled);
+    settings()->resetAttribute(QWebSettings::LocalContentCanAccessRemoteUrls);
     QWebSettings::setMaximumPagesInCache(0); // reset to default
 }
 
index be542209238dbf995625ee30478775228d539e94..0f682921bd392ac74ba3382ab2675aa3c42bbef5 100644 (file)
@@ -237,6 +237,11 @@ QString LayoutTestController::decodeHostName(const QString& host)
     return decoded;
 }
 
+void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool enabled)
+{
+    m_drt->webPage()->settings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, enabled);
+}
+
 void LayoutTestController::setJavaScriptProfilingEnabled(bool enable)
 {
     m_topLoadingFrame->page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
index f023f674d542799e38ac674faefc4d2ab66341c6..03397d63d3dc7c957d463ca7eb522277deb6777a 100644 (file)
@@ -107,6 +107,7 @@ public slots:
     QString encodeHostName(const QString& host);
     QString decodeHostName(const QString& host);
     void dumpSelectionRect() const {}
+    void setAllowUniversalAccessFromFileURLs(bool enable);
     void setJavaScriptProfilingEnabled(bool enable);
     void setFixedContentsSize(int width, int height);
     void setPrivateBrowsingEnabled(bool enable);