Diff
Modified: trunk/ChangeLog (153053 => 153054)
--- trunk/ChangeLog 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/ChangeLog 2013-07-23 17:14:52 UTC (rev 153054)
@@ -1,3 +1,13 @@
+2013-07-23 Tim Horton <[email protected]>
+
+ Add a test for plug-in unavailability indicator obscurity detection
+ https://bugs.webkit.org/show_bug.cgi?id=119007
+
+ Reviewed by Anders Carlsson.
+
+ * Source/autotools/symbols.filter:
+ Expose RenderEmbeddedObject::isReplacementObscured to internals.
+
2013-07-16 Balazs Kelemen <[email protected]>
[CMake] Undefined references should be detected at build time
Modified: trunk/LayoutTests/ChangeLog (153053 => 153054)
--- trunk/LayoutTests/ChangeLog 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/LayoutTests/ChangeLog 2013-07-23 17:14:52 UTC (rev 153054)
@@ -1,3 +1,18 @@
+2013-07-23 Tim Horton <[email protected]>
+
+ Add a test for plug-in unavailability indicator obscurity detection
+ https://bugs.webkit.org/show_bug.cgi?id=119007
+
+ Reviewed by Anders Carlsson.
+
+ Add a test that ensures that RenderEmbeddedObject accurately detects the
+ various different ways the unavailable plugin dialog can be obscured.
+
+ * platform/mac-wk2/TestExpectations:
+ * platform/mac/TestExpectations:
+ * plugins/unavailable-plugin-indicator-obscurity-expected.txt: Added.
+ * plugins/unavailable-plugin-indicator-obscurity.html: Added.
+
2013-07-23 Zoltan Horvath <[email protected]>
[Qt] REGRESSION(r152906) Modified fast/shapes/shape-inside/shape-inside-overflow.html ref test fails.
Modified: trunk/LayoutTests/platform/mac/TestExpectations (153053 => 153054)
--- trunk/LayoutTests/platform/mac/TestExpectations 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2013-07-23 17:14:52 UTC (rev 153054)
@@ -1303,3 +1303,6 @@
webkit.org/b/118900 mathml/presentation/mspace-units.html [ ImageOnlyFailure ]
webkit.org/b/118856 mathml/presentation/fenced-mi.html [ ImageOnlyFailure ]
+
+# Plug-in blocking callback doesn't exist in WebKit1, so skip and re-enable for WebKit2.
+plugins/unavailable-plugin-indicator-obscurity.html
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (153053 => 153054)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2013-07-23 17:14:52 UTC (rev 153054)
@@ -431,6 +431,9 @@
# Asserts in WebKit1-debug only, so reenabling.
compositing/geometry/fixed-position-flipped-writing-mode.html [ Pass ]
+# Plug-in blocking callback doesn't exist in WebKit1, so reenabling.
+plugins/unavailable-plugin-indicator-obscurity.html [ Pass ]
+
### END OF (5) Features that are not supported in WebKit1, so skipped in mac/TestExpectations then re-enabled here
########################################
Added: trunk/LayoutTests/plugins/unavailable-plugin-indicator-obscurity-expected.txt (0 => 153054)
--- trunk/LayoutTests/plugins/unavailable-plugin-indicator-obscurity-expected.txt (rev 0)
+++ trunk/LayoutTests/plugins/unavailable-plugin-indicator-obscurity-expected.txt 2013-07-23 17:14:52 UTC (rev 153054)
@@ -0,0 +1,30 @@
+Expected to be obscured:
+'tooSmall' was obscured: true (expected true; PASS)
+'emptyRect' was obscured: true (expected true; PASS)
+'lowOpacity' was obscured: true (expected true; PASS)
+'lowOpacityParent' was obscured: true (expected true; PASS)
+'stackedLowOpacityParents' was obscured: true (expected true; PASS)
+'clippedByParent' was obscured: true (expected true; PASS)
+'visibilityHidden' was obscured: true (expected true; PASS)
+'visibilityHiddenOnParent' was obscured: true (expected true; PASS)
+'pointerEventsBlocked' was obscured: true (expected true; PASS)
+'pointerEventsBlockedOnParent' was obscured: true (expected true; PASS)
+'leftHalfObscured' was obscured: true (expected true; PASS)
+'rightHalfObscured' was obscured: true (expected true; PASS)
+'topHalfObscured' was obscured: true (expected true; PASS)
+'bottomHalfObscured' was obscured: true (expected true; PASS)
+'centerObscured' was obscured: true (expected true; PASS)
+'offScreenTopLeft' was obscured: true (expected true; PASS)
+'offScreenTop' was obscured: true (expected true; PASS)
+'offScreenLeft' was obscured: true (expected true; PASS)
+
+Expected to not be obscured:
+'large' was obscured: false (expected false; PASS)
+'stackedHighOpacityParents' was obscured: false (expected false; PASS)
+'notClippedByParent' was obscured: false (expected false; PASS)
+'pointerEventsBlockedOnObscuringSibling' was obscured: false (expected false; PASS)
+'topQuarterObscured' was obscured: false (expected false; PASS)
+'bottomQuarterObscured' was obscured: false (expected false; PASS)
+
+Passed all tests: true
+
Added: trunk/LayoutTests/plugins/unavailable-plugin-indicator-obscurity.html (0 => 153054)
--- trunk/LayoutTests/plugins/unavailable-plugin-indicator-obscurity.html (rev 0)
+++ trunk/LayoutTests/plugins/unavailable-plugin-indicator-obscurity.html 2013-07-23 17:14:52 UTC (rev 153054)
@@ -0,0 +1,160 @@
+<html>
+<head>
+ <title>Test that the plugin unavailability indicator accurately knows if it's clipped.</title>
+ <script>
+ if (window.testRunner) {
+ testRunner.setBlockAllPlugins(true);
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+
+ function log(text) {
+ logElement.appendChild(document.createTextNode(text));
+ logElement.appendChild(document.createElement("br"));
+ }
+
+ function testObscuredPlugins(className, expectedObscured) {
+ var failedAnyTest = false;
+ var expectedObscuredPlugins = document.getElementsByClassName(className);
+ for (var i = 0; i < expectedObscuredPlugins.length; i++) {
+ var plugin = expectedObscuredPlugins[i];
+ var obscured = internals.isPluginUnavailabilityIndicatorObscured(plugin);
+ var passed = expectedObscured == obscured;
+ if (!passed)
+ failedAnyTest = true;
+
+ log("'" + plugin.id + "' was obscured: " + obscured + " (expected " + expectedObscured + "; " + (passed ? "PASS" : "FAIL") + ")");
+ };
+
+ return failedAnyTest;
+ }
+
+ window._onload_ = function () {
+ logElement = document.getElementById("log");
+
+ if (!window.internals)
+ return;
+
+ setTimeout(function () {
+ log("Expected to be obscured:");
+ var failedAnyTest = testObscuredPlugins("shouldBeObscured", true);
+ log("")
+ log("Expected to not be obscured:");
+ failedAnyTest = failedAnyTest || testObscuredPlugins("shouldNotBeObscured", false);
+ log("");
+ log("Passed all tests: " + !failedAnyTest);
+
+ // Remove the plugins so that we don't have tons of whitespace in the output.
+ while(document.body.firstChild && document.body.firstChild.id != "log") {
+ document.body.removeChild(document.body.firstChild);
+ }
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+ }
+ </script>
+ <style>
+ embed {
+ display: block;
+ width: 500px;
+ height: 500px;
+ }
+
+ .cover {
+ background-color: green;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ }
+
+ .container {
+ width: 500px;
+ height: 500px;
+ position: relative;
+ }
+ </style>
+ <body>
+ <embed id="large" class="shouldNotBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <embed id="tooSmall" class="shouldBeObscured" type="application/x-webkit-test-netscape" style="width: 10px; height: 10px;"></embed>
+ <embed id="emptyRect" class="shouldBeObscured" type="application/x-webkit-test-netscape" style="width: 0; height: 0;"></embed>
+
+ <!-- Obscured by opacity -->
+ <embed id="lowOpacity" class="shouldBeObscured" type="application/x-webkit-test-netscape" style="opacity: 0.05;"></embed>
+ <div style="opacity: 0.05;">
+ <embed id="lowOpacityParent" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ </div>
+ <div style="opacity: 0.2;">
+ <div style="opacity: 0.2;">
+ <embed id="stackedLowOpacityParents" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ </div>
+ </div>
+ <div style="opacity: 0.9;">
+ <div style="opacity: 0.9;">
+ <embed id="stackedHighOpacityParents" class="shouldNotBeObscured" type="application/x-webkit-test-netscape"></embed>
+ </div>
+ </div>
+
+ <!-- Clipped by overflow -->
+ <div style="width: 20px; overflow: hidden;">
+ <embed id="clippedByParent" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ </div>
+ <div style="width: 20px; overflow: visible;">
+ <embed id="notClippedByParent" class="shouldNotBeObscured" type="application/x-webkit-test-netscape"></embed>
+ </div>
+
+ <!-- Hidden -->
+ <embed id="visibilityHidden" class="shouldBeObscured" type="application/x-webkit-test-netscape" style="visibility: hidden;"></embed>
+ <div style="visibility: hidden;">
+ <embed id="visibilityHiddenOnParent" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ </div>
+
+ <!-- Clicks blocked via pointer-events: none -->
+ <embed id="pointerEventsBlocked" class="shouldBeObscured" type="application/x-webkit-test-netscape" style="pointer-events: none;"></embed>
+ <div style="pointer-events: none;">
+ <embed id="pointerEventsBlockedOnParent" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ </div>
+ <div class="container">
+ <embed id="pointerEventsBlockedOnObscuringSibling" class="shouldNotBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <div class="cover" style="pointer-events: none;"></div>
+ </div>
+
+ <!-- Obscured by siblings -->
+ <div class="container">
+ <embed id="leftHalfObscured" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <div class="cover" style="width: 50%;"></div>
+ </div>
+ <div class="container">
+ <embed id="rightHalfObscured" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <div class="cover" style="width: 50%; left: 50%;"></div>
+ </div>
+ <div class="container">
+ <embed id="topHalfObscured" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <div class="cover" style="height: 50%;"></div>
+ </div>
+ <div class="container">
+ <embed id="bottomHalfObscured" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <div class="cover" style="height: 50%; top: 50%;"></div>
+ </div>
+ <div class="container">
+ <embed id="topQuarterObscured" class="shouldNotBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <div class="cover" style="height: 25%;"></div>
+ </div>
+ <div class="container">
+ <embed id="bottomQuarterObscured" class="shouldNotBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <div class="cover" style="height: 25%; top: 75%;"></div>
+ </div>
+ <div class="container">
+ <embed id="centerObscured" class="shouldBeObscured" type="application/x-webkit-test-netscape"></embed>
+ <div class="cover" style="width: 20%; height: 20%; top: 40%; left: 40%;"></div>
+ </div>
+
+ <!-- Obscured by scroll clipping -->
+ <embed id="offScreenTopLeft" class="shouldBeObscured" type="application/x-webkit-test-netscape" style="position: absolute; top: -1000px; left: -1000px;"></embed>
+ <embed id="offScreenTop" class="shouldBeObscured" type="application/x-webkit-test-netscape" style="position: absolute; top: -1000px; left: 0;"></embed>
+ <embed id="offScreenLeft" class="shouldBeObscured" type="application/x-webkit-test-netscape" style="position: absolute; top: 0; left: -1000px;"></embed>
+
+ <div id="log"></div>
+ </body>
+</html>
\ No newline at end of file
Modified: trunk/Source/WebCore/ChangeLog (153053 => 153054)
--- trunk/Source/WebCore/ChangeLog 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Source/WebCore/ChangeLog 2013-07-23 17:14:52 UTC (rev 153054)
@@ -1,3 +1,22 @@
+2013-07-23 Tim Horton <[email protected]>
+
+ Add a test for plug-in unavailability indicator obscurity detection
+ https://bugs.webkit.org/show_bug.cgi?id=119007
+
+ Reviewed by Anders Carlsson.
+
+ Test: plugins/unavailable-plugin-indicator-obscurity.html
+
+ Expose the ability to test whether the unavailable plugin indicator
+ is obscured via the internals object.
+
+ * testing/Internals.cpp:
+ (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+ Expose RenderEmbeddedObject::isReplacementObscured as
+ internals.isPluginUnavailabilityIndicatorObscured for testing purposes.
+
2013-07-23 Zan Dobersek <[email protected]>
[Soup] Clean up header inclusions in ResourceRequest(Soup), SocketStreamHandle
Modified: trunk/Source/WebCore/testing/Internals.cpp (153053 => 153054)
--- trunk/Source/WebCore/testing/Internals.cpp 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Source/WebCore/testing/Internals.cpp 2013-07-23 17:14:52 UTC (rev 153054)
@@ -78,6 +78,7 @@
#include "PrintContext.h"
#include "PseudoElement.h"
#include "Range.h"
+#include "RenderEmbeddedObject.h"
#include "RenderMenuList.h"
#include "RenderObject.h"
#include "RenderTreeAsText.h"
@@ -2175,4 +2176,21 @@
}
#endif
+bool Internals::isPluginUnavailabilityIndicatorObscured(Element* element, ExceptionCode& ec)
+{
+ if (!element) {
+ ec = INVALID_ACCESS_ERR;
+ return false;
+ }
+
+ RenderObject* renderer = element->renderer();
+ if (!renderer || !renderer->isEmbeddedObject()) {
+ ec = INVALID_ACCESS_ERR;
+ return false;
+ }
+
+ RenderEmbeddedObject* embed = toRenderEmbeddedObject(renderer);
+ return embed->isReplacementObscured();
}
+
+}
Modified: trunk/Source/WebCore/testing/Internals.h (153053 => 153054)
--- trunk/Source/WebCore/testing/Internals.h 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Source/WebCore/testing/Internals.h 2013-07-23 17:14:52 UTC (rev 153054)
@@ -325,6 +325,8 @@
bool isVibrating();
#endif
+ bool isPluginUnavailabilityIndicatorObscured(Element*, ExceptionCode&);
+
private:
explicit Internals(Document*);
Document* contextDocument() const;
Modified: trunk/Source/WebCore/testing/Internals.idl (153053 => 153054)
--- trunk/Source/WebCore/testing/Internals.idl 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Source/WebCore/testing/Internals.idl 2013-07-23 17:14:52 UTC (rev 153054)
@@ -276,5 +276,7 @@
boolean isVibrating();
#endif
+ [RaisesException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
+
[RaisesException] ClientRect selectionBounds();
};
Modified: trunk/Source/autotools/symbols.filter (153053 => 153054)
--- trunk/Source/autotools/symbols.filter 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Source/autotools/symbols.filter 2013-07-23 17:14:52 UTC (rev 153054)
@@ -323,6 +323,7 @@
_ZN7WebCore28notImplementedLoggingChannelEv;
_ZN7WebCore7toUInt8EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE;
_ZN7WebCore6toInt8EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE;
+_ZNK7WebCore20RenderEmbeddedObject21isReplacementObscuredEv;
local:
_Z*;
Modified: trunk/Tools/ChangeLog (153053 => 153054)
--- trunk/Tools/ChangeLog 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Tools/ChangeLog 2013-07-23 17:14:52 UTC (rev 153054)
@@ -1,3 +1,37 @@
+2013-07-23 Tim Horton <[email protected]>
+
+ Add a test for plug-in unavailability indicator obscurity detection
+ https://bugs.webkit.org/show_bug.cgi?id=119007
+
+ Reviewed by Anders Carlsson.
+
+ Expose the ability to block plug-ins via pluginLoadPolicy to testRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setBlockAllPlugins):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ Add testRunner.setBlockAllPlugins function (and corresponding message to
+ forward it through to TestController).
+
+ * WebKitTestRunner/TestController.cpp:
+ Initialize m_shouldBlockAllPlugins to false (and drive-by initialize m_handlesAuthenticationChallenges).
+
+ (WTR::TestController::createWebViewWithOptions):
+ Register our pluginLoadPolicy callback.
+
+ (WTR::TestController::resetStateToConsistentValues):
+ Reset m_shouldBlockAllPlugins to false.
+
+ (WTR::TestController::pluginLoadPolicy):
+ Return the existing plugin load policy, unless setBlockAllPlugins(true)
+ was called, in which case we reject all plugins with kWKPluginLoadPolicyBlocked.
+
+ * WebKitTestRunner/TestController.h:
+ (WTR::TestController::setBlockAllPlugins):
+
2013-07-21 Andreas Kling <[email protected]>
KURL creates duplicate strings when completing data: URIs.
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (153053 => 153054)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2013-07-23 17:14:52 UTC (rev 153054)
@@ -190,5 +190,8 @@
// Secure text input mode (Mac only)
readonly attribute boolean secureEventInputIsEnabled;
+
+ // Override plugin load policy.
+ void setBlockAllPlugins(boolean shouldBlock);
};
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (153053 => 153054)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2013-07-23 17:14:52 UTC (rev 153054)
@@ -812,4 +812,11 @@
return WKBooleanGetValue(static_cast<WKBooleanRef>(returnData));
}
+void TestRunner::setBlockAllPlugins(bool shouldBlock)
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetBlockAllPlugins"));
+ WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(shouldBlock));
+ WKBundlePostMessage(InjectedBundle::shared().bundle(), messageName.get(), messageBody.get());
+}
+
} // namespace WTR
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (153053 => 153054)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2013-07-23 17:14:52 UTC (rev 153054)
@@ -166,6 +166,8 @@
// Audio testing.
void setAudioResult(JSContextRef, JSValueRef data);
+ void setBlockAllPlugins(bool shouldBlock);
+
enum WhatToDump { RenderTree, MainFrameText, AllFramesText, Audio, DOMAsWebArchive };
WhatToDump whatToDump() const { return m_whatToDump; }
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (153053 => 153054)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2013-07-23 17:14:52 UTC (rev 153054)
@@ -112,6 +112,8 @@
, m_isGeolocationPermissionAllowed(false)
, m_policyDelegateEnabled(false)
, m_policyDelegatePermissive(false)
+ , m_handlesAuthenticationChallenges(false)
+ , m_shouldBlockAllPlugins(false)
{
initialize(argc, argv);
controller = this;
@@ -487,7 +489,7 @@
0, // didLayout
0, // pluginLoadPolicy_deprecatedForUseWithV2
0, // pluginDidFail
- 0, // pluginLoadPolicy
+ pluginLoadPolicy, // pluginLoadPolicy
};
WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient);
@@ -625,6 +627,8 @@
m_authenticationUsername = String();
m_authenticationPassword = String();
+ m_shouldBlockAllPlugins = false;
+
// Reset main page back to about:blank
m_doneResetting = false;
@@ -1077,6 +1081,18 @@
static_cast<TestController*>(const_cast<void*>(clientInfo))->processDidCrash();
}
+WKPluginLoadPolicy TestController::pluginLoadPolicy(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInformation, WKStringRef* unavailabilityDescription, const void* clientInfo)
+{
+ return static_cast<TestController*>(const_cast<void*>(clientInfo))->pluginLoadPolicy(page, currentPluginLoadPolicy, pluginInformation, unavailabilityDescription);
+}
+
+WKPluginLoadPolicy TestController::pluginLoadPolicy(WKPageRef, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInformation, WKStringRef* unavailabilityDescription)
+{
+ if (m_shouldBlockAllPlugins)
+ return kWKPluginLoadPolicyBlocked;
+ return currentPluginLoadPolicy;
+}
+
void TestController::didCommitLoadForFrame(WKPageRef page, WKFrameRef frame)
{
if (!WKFrameIsMainFrame(frame))
Modified: trunk/Tools/WebKitTestRunner/TestController.h (153053 => 153054)
--- trunk/Tools/WebKitTestRunner/TestController.h 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2013-07-23 17:14:52 UTC (rev 153054)
@@ -98,6 +98,8 @@
void setAuthenticationUsername(String username) { m_authenticationUsername = username; }
void setAuthenticationPassword(String password) { m_authenticationPassword = password; }
+ void setBlockAllPlugins(bool shouldBlock) { m_shouldBlockAllPlugins = shouldBlock; }
+
private:
void initialize(int argc, const char* argv[]);
void createWebViewWithOptions(WKDictionaryRef);
@@ -134,6 +136,10 @@
static void processDidCrash(WKPageRef, const void* clientInfo);
void processDidCrash();
+ static WKPluginLoadPolicy pluginLoadPolicy(WKPageRef, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInformation, WKStringRef* unavailabilityDescription, const void* clientInfo);
+ WKPluginLoadPolicy pluginLoadPolicy(WKPageRef, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInformation, WKStringRef* unavailabilityDescription);
+
+
static void decidePolicyForNotificationPermissionRequest(WKPageRef, WKSecurityOriginRef, WKNotificationPermissionRequestRef, const void*);
void decidePolicyForNotificationPermissionRequest(WKPageRef, WKSecurityOriginRef, WKNotificationPermissionRequestRef);
@@ -207,6 +213,8 @@
String m_authenticationUsername;
String m_authenticationPassword;
+ bool m_shouldBlockAllPlugins;
+
#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
OwnPtr<EventSenderProxy> m_eventSenderProxy;
#endif
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (153053 => 153054)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2013-07-23 16:43:10 UTC (rev 153053)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2013-07-23 17:14:52 UTC (rev 153054)
@@ -651,6 +651,13 @@
return;
}
+ if (WKStringIsEqualToUTF8CString(messageName, "SetBlockAllPlugins")) {
+ ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
+ WKBooleanRef shouldBlock = static_cast<WKBooleanRef>(messageBody);
+ TestController::shared().setBlockAllPlugins(WKBooleanGetValue(shouldBlock));
+ return;
+ }
+
ASSERT_NOT_REACHED();
}