[WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2012 12:16:25 +0000 (12:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2012 12:16:25 +0000 (12:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=42545

Patch by Nándor Huszka <huszka.nandor@stud.u-szeged.hu> on 2012-01-26
Reviewed by Zoltan Herczeg.

Source/WebCore:

No need for new tests, there is no behavior change.

Added a line to file which copies the forwarding headers.

* WebCore.vcproj/copyForwardingHeaders.cmd:

Source/WebKit2:

Implement the setGeolocationPermission method.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetGeolocationPermission):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setGeoLocationPermission):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

Implement the setGeolocationPermission method.

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::setGeolocationPermission):
(WTR):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(LayoutTestController):

LayoutTests:

Unskip a test which does not fail now and move tests to the appropriate label.

* platform/wk2/Skipped:

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

13 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

index 8644bae..1907b86 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-26  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
+
+        [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission
+        https://bugs.webkit.org/show_bug.cgi?id=42545
+
+        Reviewed by Zoltan Herczeg.
+
+        Unskip a test which does not fail now and move tests to the appropriate label.
+
+        * platform/wk2/Skipped:
+
 2012-01-26  Kent Tamura  <tkent@chromium.org>
 
         Unreviewed, rolling out r105968.
index 2c2d735..7fd5e77 100644 (file)
@@ -535,9 +535,9 @@ platform/mac/fast/loader/file-url-mimetypes-2.html
 platform/mac/fast/loader/file-url-mimetypes-3.html
 platform/mac/fast/loader/file-url-mimetypes.html
 
-# WebKitTestRunner needs layoutTestController.setGeolocationPermission
-# <https://bugs.webkit.org/show_bug.cgi?id=42545>
-fast/dom/Geolocation/argument-types.html
+# WebKitTestRunner needs layoutTestController.setMockGeolocationPosition
+# and layoutTestController.setMockGeolocationError
+# <https://bugs.webkit.org/show_bug.cgi?id=59201>
 fast/dom/Geolocation/callback-exception.html
 fast/dom/Geolocation/callback-to-deleted-context.html
 fast/dom/Geolocation/callback-to-remote-context.html
@@ -553,7 +553,6 @@ fast/dom/Geolocation/disconnected-frame.html
 fast/dom/Geolocation/error.html
 fast/dom/Geolocation/maximum-age.html
 fast/dom/Geolocation/multiple-requests.html
-fast/dom/Geolocation/notimer-after-unload.html
 fast/dom/Geolocation/permission-denied-already-clear-watch.html
 fast/dom/Geolocation/permission-denied-already-error.html
 fast/dom/Geolocation/permission-denied-already-success.html
@@ -563,20 +562,14 @@ fast/dom/Geolocation/position-string.html
 fast/dom/Geolocation/reentrant-error.html
 fast/dom/Geolocation/reentrant-permission-denied.html
 fast/dom/Geolocation/reentrant-success.html
-fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html
 fast/dom/Geolocation/success.html
 fast/dom/Geolocation/timeout.html
+fast/dom/Geolocation/timeout-clear-watch.html
+fast/dom/Geolocation/timeout-zero.html
 fast/dom/Geolocation/timestamp.html
 fast/dom/Geolocation/watch.html
 fast/dom/Geolocation/window-close-crash.html
 
-# WebKitTestRunner needs layoutTestController.setMockGeolocationPosition
-# and layoutTestController.setMockGeolocationError
-# <https://bugs.webkit.org/show_bug.cgi?id=59201>
-fast/dom/Geolocation/timeout-clear-watch.html
-fast/dom/Geolocation/timeout-zero.html
-
-
 # WebKitTestRunner needs layoutTestController.setCustomPolicyDelegate
 # <https://bugs.webkit.org/show_bug.cgi?id=42546>
 fast/loader/javascript-url-hierarchical-execution.html
@@ -1303,7 +1296,9 @@ plugins/destroy-on-setwindow.html
 # Sporadically fails in WebKit2 for unknown reasons.
 fast/forms/input-align.html
 
-# WebProcess sometimes terminates when running this test
+# WebProcess sometimes terminates when running these tests
+fast/dom/Geolocation/notimer-after-unload.html
+fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html
 fast/forms/form-associated-element-crash.html
 
 # New history tests added in r76205 fail on WebKit2 (perhaps the change
index 9d73439..32fd88e 100644 (file)
@@ -1,3 +1,16 @@
+2012-01-26  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
+
+        [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission
+        https://bugs.webkit.org/show_bug.cgi?id=42545
+
+        Reviewed by Zoltan Herczeg.
+
+        No need for new tests, there is no behavior change.
+
+        Added a line to file which copies the forwarding headers.
+
+        * WebCore.vcproj/copyForwardingHeaders.cmd:
+
 2012-01-26  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         Not reviewed. Fix Qt build after r105978.
index 92a6e30..eea72c3 100755 (executable)
@@ -46,6 +46,7 @@ xcopy /y /d "%ProjectDir%..\platform\graphics\ca\win\*.h" "%CONFIGURATIONBUILDDI
 xcopy /y /d "%ProjectDir%..\platform\graphics\win\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\platform\graphics\win\%1\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\platform\graphics\opentype\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
+xcopy /y /d "%ProjectDir%..\platform\mock\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\platform\text\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\platform\text\transcoder\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
 xcopy /y /d "%ProjectDir%..\platform\win\*.h" "%CONFIGURATIONBUILDDIR%\include\WebCore"
index 2d6fe9f..dbc6db0 100644 (file)
@@ -1,3 +1,21 @@
+2012-01-26  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
+
+        [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission
+        https://bugs.webkit.org/show_bug.cgi?id=42545
+
+        Reviewed by Zoltan Herczeg.
+
+        Implement the setGeolocationPermission method.
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetGeolocationPermission):
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setGeoLocationPermission):
+        (WebKit):
+        * WebProcess/InjectedBundle/InjectedBundle.h:
+        (InjectedBundle):
+
 2012-01-25  Mark Rowe  <mrowe@apple.com>
 
         Build in to an alternate location when USE_STAGING_INSTALL_PATH is set.
index bb25f39..f4013a1 100644 (file)
@@ -146,6 +146,11 @@ void WKBundleSetFrameFlatteningEnabled(WKBundleRef bundleRef, WKBundlePageGroupR
     toImpl(bundleRef)->setFrameFlatteningEnabled(toImpl(pageGroupRef), enabled);
 }
 
+void WKBundleSetGeolocationPermission(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
+{
+    toImpl(bundleRef)->setGeoLocationPermission(toImpl(pageGroupRef), enabled);
+}
+
 void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
 {
     toImpl(bundleRef)->setJavaScriptCanAccessClipboard(toImpl(pageGroupRef), enabled);
index a4e1c50..9a2fbfa 100644 (file)
@@ -68,6 +68,7 @@ WK_EXPORT void WKBundleOverrideXSSAuditorEnabledForTestRunner(WKBundleRef bundle
 WK_EXPORT void WKBundleSetAllowUniversalAccessFromFileURLs(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetAllowFileAccessFromFileURLs(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetFrameFlatteningEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
+WK_EXPORT void WKBundleSetGeolocationPermission(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
 WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
index a0db5ed..6bc3c08 100644 (file)
 #include <WebCore/Frame.h>
 #include <WebCore/FrameView.h>
 #include <WebCore/GCController.h>
+#include <WebCore/GeolocationClient.h>
+#include <WebCore/GeolocationClientMock.h>
+#include <WebCore/GeolocationController.h>
+#include <WebCore/GeolocationPosition.h>
 #include <WebCore/JSDOMWindow.h>
 #include <WebCore/Page.h>
 #include <WebCore/PageGroup.h>
@@ -145,6 +149,15 @@ void InjectedBundle::setFrameFlatteningEnabled(WebPageGroupProxy* pageGroup, boo
         (*iter)->settings()->setFrameFlatteningEnabled(enabled);
 }
 
+void InjectedBundle::setGeoLocationPermission(WebPageGroupProxy* pageGroup, bool enabled)
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
+    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
+        static_cast<GeolocationClientMock*>((*iter)->geolocationController()->client())->setPermission(enabled);
+#endif
+}
+
 void InjectedBundle::setJavaScriptCanAccessClipboard(WebPageGroupProxy* pageGroup, bool enabled)
 {
     const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
index e6abace..c53c050 100644 (file)
@@ -101,6 +101,7 @@ public:
     void setAllowUniversalAccessFromFileURLs(WebPageGroupProxy*, bool);
     void setAllowFileAccessFromFileURLs(WebPageGroupProxy*, bool);
     void setFrameFlatteningEnabled(WebPageGroupProxy*, bool);
+    void setGeoLocationPermission(WebPageGroupProxy*, bool);
     void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
     void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
     void setPopupBlockingEnabled(WebPageGroupProxy*, bool);
index 36a6816..aae8584 100644 (file)
@@ -1,3 +1,19 @@
+2012-01-26  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
+
+        [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission
+        https://bugs.webkit.org/show_bug.cgi?id=42545
+
+        Reviewed by Zoltan Herczeg.
+
+        Implement the setGeolocationPermission method.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::setGeolocationPermission):
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+        (LayoutTestController):
+
 2012-01-26  Balazs Kelemen  <kbalazs@webkit.org>
 
         [NRWT] Support --ignore-metrics
index 84a476d..e7eec3c 100644 (file)
@@ -52,6 +52,7 @@ module WTR {
         void setAllowUniversalAccessFromFileURLs(in boolean value);
         void setAllowFileAccessFromFileURLs(in boolean value);
         void setFrameFlatteningEnabled(in boolean value);
+        void setGeolocationPermission(in boolean value);
         void setJavaScriptCanAccessClipboard(in boolean value);
         void setPrivateBrowsingEnabled(in boolean value);
         void setPopupBlockingEnabled(in boolean value);
index 8110961..3e98cce 100644 (file)
@@ -368,6 +368,11 @@ void LayoutTestController::setFrameFlatteningEnabled(bool enabled)
     WKBundleSetFrameFlatteningEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
 }
 
+void LayoutTestController::setGeolocationPermission(bool enabled)
+{
+    WKBundleSetGeolocationPermission(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
+}
+
 void LayoutTestController::setJavaScriptCanAccessClipboard(bool enabled)
 {
      WKBundleSetJavaScriptCanAccessClipboard(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
index fbdac91..f46bf80 100644 (file)
@@ -83,6 +83,7 @@ public:
     void setAllowUniversalAccessFromFileURLs(bool);
     void setAllowFileAccessFromFileURLs(bool);
     void setFrameFlatteningEnabled(bool);
+    void setGeolocationPermission(bool);
     void setJavaScriptCanAccessClipboard(bool);
     void setPrivateBrowsingEnabled(bool);
     void setPopupBlockingEnabled(bool);