Title: [118937] trunk
Revision
118937
Author
[email protected]
Date
2012-05-30 10:29:32 -0700 (Wed, 30 May 2012)

Log Message

WebKit2: Implement layoutTestController.setPluginsEnabled() in WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=58593

Source/WebKit2:

Adds the ability to change the pluginsEnabled flag in WebCore::Settings
to WebKitTestRunner's LayoutTestController. The flag is modified via the
public C API of the WebProcess.

Patch by Marcelo Lira <[email protected]> on 2012-05-30
Reviewed by Darin Adler.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetPluginsEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPluginsEnabled): Calls the setPluginsEnabled
method for the WebCore::Settings of each WebCore::Page in the current
page group.
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

Adds the ability to change the pluginsEnabled flag in WebCore::Settings
to WebKitTestRunner's LayoutTestController. The flag is modified via the
public C API of the WebProcess.

Patch by Marcelo Lira <[email protected]> on 2012-05-30
Reviewed by Darin Adler.

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::setPluginsEnabled): Just calls the
WKBundleSetPluginsEnabled function in the public C API of WebProcess.
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:

LayoutTests:

Unskip passing tests.

Patch by Marcelo Lira <[email protected]> on 2012-05-30
Reviewed by Darin Adler.

* platform/wk2/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (118936 => 118937)


--- trunk/LayoutTests/ChangeLog	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/LayoutTests/ChangeLog	2012-05-30 17:29:32 UTC (rev 118937)
@@ -1,3 +1,14 @@
+2012-05-30  Marcelo Lira  <[email protected]>
+
+        WebKit2: Implement layoutTestController.setPluginsEnabled() in WebKitTestRunner.
+        https://bugs.webkit.org/show_bug.cgi?id=58593
+
+        Unskip passing tests.
+
+        Reviewed by Darin Adler.
+
+        * platform/wk2/Skipped:
+
 2012-05-30  Rafael Weinstein  <[email protected]>
 
         Updating test expectations (css3/filters/custom-filter-property-computed-style,

Modified: trunk/LayoutTests/platform/wk2/Skipped (118936 => 118937)


--- trunk/LayoutTests/platform/wk2/Skipped	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/LayoutTests/platform/wk2/Skipped	2012-05-30 17:29:32 UTC (rev 118937)
@@ -839,12 +839,6 @@
 # WebKitTestRunner needs layoutTestController.callShouldCloseOnWebView
 fast/events/onbeforeunload-focused-iframe.html
 
-# WebKitTestRunner needs layoutTestController.setPluginsEnabled
-# https://bugs.webkit.org/show_bug.cgi?id=58593
-platform/mac/plugins/disable-plugins.html
-fast/images/embed-image.html
-fast/images/move-image-to-new-document.html
-
 # WebKitTestRunner needs layoutTestController.setHandlesAuthenticationChallenges
 http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html
 http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html

Modified: trunk/Source/WebKit2/ChangeLog (118936 => 118937)


--- trunk/Source/WebKit2/ChangeLog	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-30 17:29:32 UTC (rev 118937)
@@ -1,3 +1,25 @@
+2012-05-30  Marcelo Lira  <[email protected]>
+
+        WebKit2: Implement layoutTestController.setPluginsEnabled() in WebKitTestRunner.
+        https://bugs.webkit.org/show_bug.cgi?id=58593
+
+        Adds the ability to change the pluginsEnabled flag in WebCore::Settings
+        to WebKitTestRunner's LayoutTestController. The flag is modified via the
+        public C API of the WebProcess.
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetPluginsEnabled):
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setPluginsEnabled): Calls the setPluginsEnabled
+        method for the WebCore::Settings of each WebCore::Page in the current
+        page group.
+        (WebKit):
+        * WebProcess/InjectedBundle/InjectedBundle.h:
+        (InjectedBundle):
+
 2012-05-30  Caio Marcelo de Oliveira Filho  <[email protected]>
 
         HashTable.h has using directives for std::pair and std::make_pair

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp (118936 => 118937)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2012-05-30 17:29:32 UTC (rev 118937)
@@ -146,6 +146,11 @@
     toImpl(bundleRef)->setFrameFlatteningEnabled(toImpl(pageGroupRef), enabled);
 }
 
+void WKBundleSetPluginsEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
+{
+    toImpl(bundleRef)->setPluginsEnabled(toImpl(pageGroupRef), enabled);
+}
+
 void WKBundleSetGeolocationPermission(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
 {
     toImpl(bundleRef)->setGeoLocationPermission(toImpl(pageGroupRef), enabled);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (118936 => 118937)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2012-05-30 17:29:32 UTC (rev 118937)
@@ -69,6 +69,7 @@
 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 WKBundleSetPluginsEnabled(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);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (118936 => 118937)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-05-30 17:29:32 UTC (rev 118937)
@@ -196,6 +196,13 @@
         (*iter)->settings()->setFrameFlatteningEnabled(enabled);
 }
 
+void InjectedBundle::setPluginsEnabled(WebPageGroupProxy* pageGroup, bool enabled)
+{
+    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
+    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
+        (*iter)->settings()->setPluginsEnabled(enabled);
+}
+
 void InjectedBundle::setGeoLocationPermission(WebPageGroupProxy* pageGroup, bool enabled)
 {
 #if ENABLE(GEOLOCATION)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h (118936 => 118937)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2012-05-30 17:29:32 UTC (rev 118937)
@@ -108,6 +108,7 @@
     void setAllowUniversalAccessFromFileURLs(WebPageGroupProxy*, bool);
     void setAllowFileAccessFromFileURLs(WebPageGroupProxy*, bool);
     void setFrameFlatteningEnabled(WebPageGroupProxy*, bool);
+    void setPluginsEnabled(WebPageGroupProxy*, bool);
     void setGeoLocationPermission(WebPageGroupProxy*, bool);
     void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
     void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);

Modified: trunk/Tools/ChangeLog (118936 => 118937)


--- trunk/Tools/ChangeLog	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Tools/ChangeLog	2012-05-30 17:29:32 UTC (rev 118937)
@@ -1,3 +1,20 @@
+2012-05-30  Marcelo Lira  <[email protected]>
+
+        WebKit2: Implement layoutTestController.setPluginsEnabled() in WebKitTestRunner.
+        https://bugs.webkit.org/show_bug.cgi?id=58593
+
+        Adds the ability to change the pluginsEnabled flag in WebCore::Settings
+        to WebKitTestRunner's LayoutTestController. The flag is modified via the
+        public C API of the WebProcess.
+
+        Reviewed by Darin Adler.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::setPluginsEnabled): Just calls the
+        WKBundleSetPluginsEnabled function in the public C API of WebProcess.
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
 2012-05-30  Mikhail Pozdnyakov  <[email protected]>
 
         [EFL][DRT] http/tests/navigation/new-window-redirect-history.html does not pass

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl (118936 => 118937)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2012-05-30 17:29:32 UTC (rev 118937)
@@ -54,6 +54,7 @@
         void setAllowUniversalAccessFromFileURLs(in boolean value);
         void setAllowFileAccessFromFileURLs(in boolean value);
         void setFrameFlatteningEnabled(in boolean value);
+        void setPluginsEnabled(in boolean value);
         void setGeolocationPermission(in boolean value);
         void setJavaScriptCanAccessClipboard(in boolean value);
         void setPrivateBrowsingEnabled(in boolean value);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp (118936 => 118937)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2012-05-30 17:29:32 UTC (rev 118937)
@@ -371,6 +371,11 @@
     WKBundleSetFrameFlatteningEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
 }
 
+void LayoutTestController::setPluginsEnabled(bool enabled)
+{
+    WKBundleSetPluginsEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
+}
+
 void LayoutTestController::setGeolocationPermission(bool enabled)
 {
     WKBundleSetGeolocationPermission(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h (118936 => 118937)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2012-05-30 17:26:53 UTC (rev 118936)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2012-05-30 17:29:32 UTC (rev 118937)
@@ -88,6 +88,7 @@
     void setAllowUniversalAccessFromFileURLs(bool);
     void setAllowFileAccessFromFileURLs(bool);
     void setFrameFlatteningEnabled(bool);
+    void setPluginsEnabled(bool);
     void setGeolocationPermission(bool);
     void setJavaScriptCanAccessClipboard(bool);
     void setPrivateBrowsingEnabled(bool);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to