From 725fc1f88fd0a2c1de3e07c21bca51ca1f8543bd Mon Sep 17 00:00:00 2001 From: "commit-queue@webkit.org" Date: Thu, 26 Jan 2012 12:16:25 +0000 Subject: [PATCH] [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission https://bugs.webkit.org/show_bug.cgi?id=42545 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Nándor Huszka 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 --- LayoutTests/ChangeLog | 11 +++++++++++ LayoutTests/platform/wk2/Skipped | 21 ++++++++------------- Source/WebCore/ChangeLog | 13 +++++++++++++ .../WebCore.vcproj/copyForwardingHeaders.cmd | 1 + Source/WebKit2/ChangeLog | 18 ++++++++++++++++++ .../WebProcess/InjectedBundle/API/c/WKBundle.cpp | 5 +++++ .../InjectedBundle/API/c/WKBundlePrivate.h | 1 + .../WebProcess/InjectedBundle/InjectedBundle.cpp | 13 +++++++++++++ .../WebProcess/InjectedBundle/InjectedBundle.h | 1 + Tools/ChangeLog | 16 ++++++++++++++++ .../Bindings/LayoutTestController.idl | 1 + .../InjectedBundle/LayoutTestController.cpp | 5 +++++ .../InjectedBundle/LayoutTestController.h | 1 + 13 files changed, 94 insertions(+), 13 deletions(-) diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 8644bae..1907b862 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,14 @@ +2012-01-26 Nándor Huszka + + [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 Unreviewed, rolling out r105968. diff --git a/LayoutTests/platform/wk2/Skipped b/LayoutTests/platform/wk2/Skipped index 2c2d735..7fd5e77 100644 --- a/LayoutTests/platform/wk2/Skipped +++ b/LayoutTests/platform/wk2/Skipped @@ -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 -# -fast/dom/Geolocation/argument-types.html +# WebKitTestRunner needs layoutTestController.setMockGeolocationPosition +# and layoutTestController.setMockGeolocationError +# 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 -# -fast/dom/Geolocation/timeout-clear-watch.html -fast/dom/Geolocation/timeout-zero.html - - # WebKitTestRunner needs layoutTestController.setCustomPolicyDelegate # 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 diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 9d73439..32fd88e 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2012-01-26 Nándor Huszka + + [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 Not reviewed. Fix Qt build after r105978. diff --git a/Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd b/Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd index 92a6e30..eea72c3 100755 --- a/Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd +++ b/Source/WebCore/WebCore.vcproj/copyForwardingHeaders.cmd @@ -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" diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 2d6fe9f..dbc6db0 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,21 @@ +2012-01-26 Nándor Huszka + + [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 Build in to an alternate location when USE_STAGING_INSTALL_PATH is set. diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp index bb25f39..f4013a1 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp @@ -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); diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h index a4e1c50..9a2fbfa 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h +++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h @@ -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); diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp index a0db5ed..6bc3c08 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp @@ -46,6 +46,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -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& pages = PageGroup::pageGroup(pageGroup->identifier())->pages(); + for (HashSet::iterator iter = pages.begin(); iter != pages.end(); ++iter) + static_cast((*iter)->geolocationController()->client())->setPermission(enabled); +#endif +} + void InjectedBundle::setJavaScriptCanAccessClipboard(WebPageGroupProxy* pageGroup, bool enabled) { const HashSet& pages = PageGroup::pageGroup(pageGroup->identifier())->pages(); diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h index e6abace..c53c050 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h +++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h @@ -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); diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 36a6816..aae8584 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,19 @@ +2012-01-26 Nándor Huszka + + [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 [NRWT] Support --ignore-metrics diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl index 84a476d..e7eec3c 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl +++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl @@ -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); diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp index 8110961..3e98cce 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp @@ -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); diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h index fbdac91..f46bf80 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h +++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h @@ -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); -- 2.7.4