Bug 165410

Summary: WebKitTestRunner: Plugins are disabled in new windows
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebKit2Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, ap, cmarcelo
Priority: P2    
Version: WebKit Local Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Daniel Bates 2016-12-05 13:23:41 PST
Currently WebKitTestRunner only enables plugins in the main window. So, a test that opens a new window and loads a plugin will fail. We should enable plugins in all windows by default. Moreover toggling testRunner.setPluginsEnabled() should effect all windows. This will make the behavior of WebKitTestRunner more closely match the behavior DumpRenderTree.
Comment 1 Daniel Bates 2016-12-05 13:27:08 PST
Created attachment 296183 [details]
Patch
Comment 2 Alex Christensen 2016-12-05 20:35:25 PST
Comment on attachment 296183 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=296183&action=review

> Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:-51
> -WK_EXPORT void WKBundleSetPluginsEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);

Are we sure nobody uses this, or do we need to move it to WKDeprecatedFunctions.cpp?
Comment 3 Daniel Bates 2016-12-06 10:27:25 PST
(In reply to comment #2)
> Comment on attachment 296183 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=296183&action=review
> 
> > Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:-51
> > -WK_EXPORT void WKBundleSetPluginsEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
> 
> Are we sure nobody uses this, or do we need to move it to
> WKDeprecatedFunctions.cpp?

As far as I can tell WKBundleSetPluginsEnabled() is only used by WebKitTestRunner. This is consistent with the comment above its declaration "TestRunner only SPIs.", <http://trac.webkit.org/browser/trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h?rev=209193#L43>.
Comment 4 Daniel Bates 2016-12-06 11:36:23 PST
Comment on attachment 296183 [details]
Patch

Clearing flags on attachment: 296183

Committed r209408: <http://trac.webkit.org/changeset/209408>
Comment 5 Daniel Bates 2016-12-06 11:36:28 PST
All reviewed patches have been landed.  Closing bug.