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.
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):
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.
* Source/autotools/symbols.filter:
Expose RenderEmbeddedObject::isReplacementObscured to internals.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed