New issue
Advanced search Search tips

Issue 607981 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 477150



Sign in to add a comment

OOPIF trouble with application/x-blink-deprecated-test-plugin

Project Member Reported by lukasza@chromium.org, Apr 29 2016

Issue description

When running layout tests with --site-per-process flag ...

$ ninja ... blink_tests
$ DISPLAY=:20 third_party/WebKit/Tools/Scripts/run-webkit-tests -t gn -v --additional-drt-flag=--site-per-process --additional-drt-flag=--no-sandbox http/tests/plugins/cross-frame-object-access.html

... there is no testExecuteScript method on document.querySelector('embed') for <embed type="application/x-blink-deprecated-test-plugin"></embed>.

I've tried adding printf-debugging to RegisterBlinkTestPlugin and it is getting called, but not in the renderer that executes javascript that tries to access testExecuteScript method.  I am not sure if it really is not getting called, or if stderr is not getting forwarded, or if something else is going on.
 
The plugin should be registered via the following call stack:

#2 0x00000073aa01 ppapi::RegisterBlinkTestPlugin()
#3 0x000001a84a44 content::ShellMainDelegate::BasicStartupComplete()
#4 0x7f0062f939af content::ContentMainRunnerImpl::Initialize()
#5 0x7f0062f90e29 content::ContentMain()
#6 0x0000005b9a76 main


FWIW, I see that when test_runner::TestRunnerBindings::Install is called (in the same renderer process that later fails to get testExecuteScript method) content::ContentMain is on the stack, so the previous stack should also have been hit?:

#2 0x7f14e8d88d53 test_runner::TestRunnerBindings::Install()
#3 0x7f14e8dbe8ef test_runner::TestRunnerForSpecificView::Install()
#4 0x000001c0cb38 test_runner::WebFrameTestProxy<>::didClearWindowObject()
...
#32 0x7f14f56febac content::RendererMain()
#33 0x7f14f5b21c6d content::RunZygote()
#34 0x7f14f5b22ddd content::RunNamedProcessTypeMain()
#35 0x7f14f5b2495c content::ContentMainRunnerImpl::Run()
#36 0x7f14f5b20e61 content::ContentMain()
#37 0x0000005b9a76 main

Project Member

Comment 2 by bugdroid1@chromium.org, May 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6bd0f3201a2bc6c1d30dfc8a5a23eeeaedf56e2b

commit 6bd0f3201a2bc6c1d30dfc8a5a23eeeaedf56e2b
Author: lukasza <lukasza@chromium.org>
Date: Tue May 03 16:26:14 2016

Triaging some of the remaining site-per-process layout test failures.

Most of the changes in this CL just moved test expectations around and
added comments with bug pointers.

One exception is that http/tests/appcache/remove-cache.html expectation
has been removed altogether:
- this test passes on the Site Isolation FYI
- flakiness is already called out in  https://crbug.com/518929 
- locally I see a failure with and without --site-per-process, but since
  the bots are happy we should just remove the exception I think

BUG= 582211 ,  608015 ,  608023 ,  606594 ,  607991 ,  607981 

Review-Url: https://codereview.chromium.org/1931143002
Cr-Commit-Position: refs/heads/master@{#391262}

[modify] https://crrev.com/6bd0f3201a2bc6c1d30dfc8a5a23eeeaedf56e2b/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process

Comment 3 by sshru...@google.com, May 18 2016

Labels: Test-Layout

Comment 4 by sshru...@google.com, May 18 2016

Components: -Blink>LayoutTests
Deprecating component:Blink>LayoutTests, to use label Test=Layout instead.
Project Member

Comment 5 by bugdroid1@chromium.org, May 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb92f3e718335521cf454e53651235fbf30c10e2

commit fb92f3e718335521cf454e53651235fbf30c10e2
Author: alexmos <alexmos@chromium.org>
Date: Fri May 20 01:03:52 2016

Fix navigator.plugins and navigator.mimeTypes for OOPIFs.

Previously, Page::pluginData() returned nullptr when the Page's main
frame was a RemoteFrame.  This caused navigator.plugins and
navigator.mimeTypes to both return empty arrays from an OOPIF.

Page::pluginData() needed the main frame to run the
FrameLoader::allowPlugins check on it.  This CL moves this check to
happen on the actual LocalFrame that needs to access
Page::pluginData().

BUG= 612200 ,  607981 

Review-Url: https://codereview.chromium.org/1990343002
Cr-Commit-Position: refs/heads/master@{#394942}

[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
[add] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame-expected.txt
[add] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame.html
[add] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/LayoutTests/http/tests/plugins/resources/navigator-plugins-frame.html
[add] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/LayoutTests/http/tests/plugins/resources/navigator-plugins.js
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/core/dom/DOMImplementation.cpp
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/core/page/Page.cpp
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.cpp
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
[modify] https://crrev.com/fb92f3e718335521cf454e53651235fbf30c10e2/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Owner: alex...@chromium.org
Status: Fixed (was: Untriaged)
This should be fixed by my r394942.  Apparently, the test here failed because FrameLoaderClientImpl::getObjectContentType couldn't look up pluginData, which affected its return value.  I think that it incorrectly concluded that the plugin doesn't support the provided mime type, but I didn't dig further into this or how that actually causes the error message about testExecuteScript.  Regardless, the test is now passing with my fix to pluginData.
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 1 2016

Labels: merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bc0578a78ae310a0216210e9e6894537acb7d8e6

commit bc0578a78ae310a0216210e9e6894537acb7d8e6
Author: Alex Moshchuk <alexmos@chromium.org>
Date: Fri Jul 01 22:03:34 2016

Fix navigator.plugins and navigator.mimeTypes for OOPIFs.

Previously, Page::pluginData() returned nullptr when the Page's main
frame was a RemoteFrame.  This caused navigator.plugins and
navigator.mimeTypes to both return empty arrays from an OOPIF.

Page::pluginData() needed the main frame to run the
FrameLoader::allowPlugins check on it.  This CL moves this check to
happen on the actual LocalFrame that needs to access
Page::pluginData().

BUG= 612200 ,  607981 ,  616445 

Review-Url: https://codereview.chromium.org/1990343002
Cr-Commit-Position: refs/heads/master@{#394942}
(cherry picked from commit fb92f3e718335521cf454e53651235fbf30c10e2)

Review URL: https://codereview.chromium.org/2121433002 .

Cr-Commit-Position: refs/branch-heads/2743@{#572}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
[add] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame-expected.txt
[add] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/LayoutTests/http/tests/plugins/navigator-plugins-in-cross-origin-frame.html
[add] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/LayoutTests/http/tests/plugins/resources/navigator-plugins-frame.html
[add] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/LayoutTests/http/tests/plugins/resources/navigator-plugins.js
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/core/dom/DOMImplementation.cpp
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/core/page/Page.cpp
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.cpp
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
[modify] https://crrev.com/bc0578a78ae310a0216210e9e6894537acb7d8e6/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Labels: Needs-Feedback
alexmos@ : Please let us know the steps to verify it,if it can be verified from TE end. The  issue 616445  and  issue 612200  are working fine with their respective steps.
#8: The steps are given my lukasza@ in the description: just run the http/tests/plugins/cross-frame-object-access.html layout test with --site-per-process enabled:

$ third_party/WebKit/Tools/Scripts/run-webkit-tests -t gn -v --additional-drt-flag=--site-per-process http/tests/plugins/cross-frame-object-access.html

The test should now pass.  Unlike the other two issues, this was a test-only issue, so not verifiable in a Chrome build.
Labels: -Needs-Feedback
Thanks for the feedback.Its related Layout-tests and Test team can't verify this.

Sign in to add a comment