[Qt] Allow removing 'qrc' as a local security origin scheme
authorvestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2009 15:36:52 +0000 (15:36 +0000)
committervestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2009 15:36:52 +0000 (15:36 +0000)
Reviewed by Simon Hausmann.

WebCore:

* page/SecurityOrigin.cpp:

WebKit/qt:

* tests/qwebpage/tst_qwebpage.cpp:

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

WebCore/ChangeLog
WebCore/page/SecurityOrigin.cpp
WebKit/qt/ChangeLog
WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

index 3dc0b039b87623c18c991f40a5562f2396593a09..7fb77d3545dc97f322e107652e9f792425633d08 100644 (file)
@@ -1,3 +1,11 @@
+2009-12-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Allow removing 'qrc' as a local security origin scheme
+
+        * page/SecurityOrigin.cpp:
+
 2009-12-04  Zoltan Horvath  <zoltan@webkit.org>
 
         Reviewed by Eric Seidel.
index 9a413b143c5d89a2d1e95c064971fcb746b47c21..6d55d3ef7f59fddb9f231df690c82b07825217b7 100644 (file)
@@ -407,10 +407,6 @@ void SecurityOrigin::removeURLSchemeRegisteredAsLocal(const String& scheme)
 #if PLATFORM(MAC)
     if (scheme == "applewebdata")
         return;
-#endif
-#if PLATFORM(QT)
-    if (scheme == "qrc")
-        return;
 #endif
     localSchemes().remove(scheme);
 }
index a1e3ebb1b6d95958507c52d3d7f935d26863ae3e..f1a97c7c8a7004c53c126ca39f8a5567242dbe94 100644 (file)
@@ -1,3 +1,11 @@
+2009-12-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        [Qt] Allow removing 'qrc' as a local security origin scheme
+
+        * tests/qwebpage/tst_qwebpage.cpp:
+
 2009-12-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
         Reviewed by Simon Hausmann.
index 6698ff45128396ebdac4d2bb8033880cc15fd1a8..2a52631cab0a44aea2bd166c18413b2f58299980 100644 (file)
@@ -1534,10 +1534,17 @@ void tst_QWebPage::protectBindingsRuntimeObjectsFromCollector()
 void tst_QWebPage::localURLSchemes()
 {
     int i = QWebSecurityOrigin::localSchemes().size();
+
     QWebSecurityOrigin::removeLocalScheme("file");
     QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
     QWebSecurityOrigin::addLocalScheme("file");
     QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
+
+    QWebSecurityOrigin::removeLocalScheme("qrc");
+    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i - 1);
+    QWebSecurityOrigin::addLocalScheme("qrc");
+    QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i);
+
     QString myscheme = "myscheme";
     QWebSecurityOrigin::addLocalScheme(myscheme);
     QTRY_COMPARE(QWebSecurityOrigin::localSchemes().size(), i + 1);