|
|
Created:
4 years, 9 months ago by Łukasz Anforowicz Modified:
4 years, 9 months ago Reviewers:
jochen (gone - plz use gerrit) CC:
chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, Peter Beverloo, site-isolation-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@reenable-tests-fixed-by-alex Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionQuit BlinkTestRunner::TestFinished early if main frame is not local.
content::BlinkTestRunner::TestFinished assumes that main frame is local.
This assumption only accidentally holds true today when running layout
tests with --site-per-process flag - it holds true with OOPIFs, because
today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message
which means that BlinkTestRunner::is_main_window_ is set to false in
OOPIFs (even if they actually *are* in the main window).
This assumption is needed for
test_runner::TestRunner::CheckResponseMimeType and for the call to
test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets
the main frame only).
This CL makes sure that the assumption will hold true even if an
equivalent of ShellViewMsg_SetTestConfiguration message is sent to
OOPIFs in the future (i.e. after crrev.com/1750063002). This is done,
by having OOPIFs ask the browser to forward TestFinished to the
BlinkTestRunner where main frame is local (similarily to how this was
already asked from renderers associated with secondary test windows).
Because of this change, ...SecondaryWindow... is replaced with
...SecondaryRenderer... where applicable.
Note - this CL prevents a crash in a future CL
(https://crrev.com/1750063002), by enforcing the assumption described
above (and exiting early if the assumption doesn't hold). OTOH, this CL
does NOT actually cause ShellViewHostMsg_TestFinishedInSecondaryRenderer
to be delivered to the browser in all the cases - there are extra issues
that prevent that from happening (these issues are addressed in a later
CL proposed at https://crrev.com/1765623003/). Not delivering the
message is harmless and actually prevents test failures at this
point (when runtime test flags are not yet replicated - until we land
https://crrev.com/1715573002/).
BUG=587175
Committed: https://crrev.com/f6b148302e76a6450d87ea49ef9e6f9836ca2639
Cr-Commit-Position: refs/heads/master@{#379870}
Patch Set 1 #Patch Set 2 : Rebasing... #
Total comments: 3
Patch Set 3 : Rebasing... #
Dependent Patchsets: Messages
Total messages: 17 (9 generated)
Description was changed from ========== Ensure that BlinkTestRunner::TestFinished is only when main frame is local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout. This assumption accidentally holds true today, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they are in the main window). This CL makes sure that the assumption above will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future. This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. This CL means that presence of OOPIFs can cause different browser/renderer messages to be exchanged between BlinkTestController and BlinkTestRunner. This is unfortunate, because it means that synchronization done by the test in default running mode might be insufficient with --site-per-process mode. Ideally, we would consistently forward TestFinished processing to the main frame's renderer, regardless of whether OOPIFs are active or not (i.e. basing the forwarding decision on whether the end of test was trigerred by the main frame vs by a child frame). Unfortunately, BlinkTestRunner::TestFinished is not capable of detecting which frame triggered end of test (sometimes the test is triggered by a specific frame calling testRunner.notifyDone, but sometimes the test is triggered in a frame-agnostic way when the queue in test_runner::TestRunner::WorkQueue gets empty). BUG=587175 ========== to ========== Ensure that BlinkTestRunner::TestFinished is only called when main frame is local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout. This assumption accidentally holds true today, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they are in the main window). This CL makes sure that the assumption above will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future. This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. This CL means that presence of OOPIFs can cause different browser/renderer messages to be exchanged between BlinkTestController and BlinkTestRunner. This is unfortunate, because it means that synchronization done by the test in default running mode might be insufficient with --site-per-process mode. Ideally, we would consistently forward TestFinished processing to the main frame's renderer, regardless of whether OOPIFs are active or not (i.e. basing the forwarding decision on whether the end of test was trigerred by the main frame vs by a child frame). Unfortunately, BlinkTestRunner::TestFinished is not capable of detecting which frame triggered end of test (sometimes the test is triggered by a specific frame calling testRunner.notifyDone, but sometimes the test is triggered in a frame-agnostic way when the queue in test_runner::TestRunner::WorkQueue gets empty). BUG=587175 ==========
Description was changed from ========== Ensure that BlinkTestRunner::TestFinished is only called when main frame is local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout. This assumption accidentally holds true today, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they are in the main window). This CL makes sure that the assumption above will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future. This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. This CL means that presence of OOPIFs can cause different browser/renderer messages to be exchanged between BlinkTestController and BlinkTestRunner. This is unfortunate, because it means that synchronization done by the test in default running mode might be insufficient with --site-per-process mode. Ideally, we would consistently forward TestFinished processing to the main frame's renderer, regardless of whether OOPIFs are active or not (i.e. basing the forwarding decision on whether the end of test was trigerred by the main frame vs by a child frame). Unfortunately, BlinkTestRunner::TestFinished is not capable of detecting which frame triggered end of test (sometimes the test is triggered by a specific frame calling testRunner.notifyDone, but sometimes the test is triggered in a frame-agnostic way when the queue in test_runner::TestRunner::WorkQueue gets empty). BUG=587175 ========== to ========== Ensure that BlinkTestRunner::TestFinished is only called when main frame is local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout. This assumption accidentally holds true today, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This CL makes sure that the assumption above will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. This CL means that presence of OOPIFs can cause different browser/renderer messages to be exchanged between BlinkTestController and BlinkTestRunner. This is unfortunate, because it means that synchronization done by the test in default running mode might be insufficient with --site-per-process mode. Ideally, we would consistently forward TestFinished processing to the main frame's renderer, regardless of whether OOPIFs are active or not (i.e. basing the forwarding decision on whether the end of test was trigerred by the main frame vs by a child frame). Unfortunately, BlinkTestRunner::TestFinished is not capable of detecting which frame triggered end of test (sometimes the test is triggered by a specific frame calling testRunner.notifyDone, but sometimes the test is triggered in a frame-agnostic way when the queue in test_runner::TestRunner::WorkQueue gets empty). BUG=587175 ==========
Description was changed from ========== Ensure that BlinkTestRunner::TestFinished is only called when main frame is local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout. This assumption accidentally holds true today, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This CL makes sure that the assumption above will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. This CL means that presence of OOPIFs can cause different browser/renderer messages to be exchanged between BlinkTestController and BlinkTestRunner. This is unfortunate, because it means that synchronization done by the test in default running mode might be insufficient with --site-per-process mode. Ideally, we would consistently forward TestFinished processing to the main frame's renderer, regardless of whether OOPIFs are active or not (i.e. basing the forwarding decision on whether the end of test was trigerred by the main frame vs by a child frame). Unfortunately, BlinkTestRunner::TestFinished is not capable of detecting which frame triggered end of test (sometimes the test is triggered by a specific frame calling testRunner.notifyDone, but sometimes the test is triggered in a frame-agnostic way when the queue in test_runner::TestRunner::WorkQueue gets empty). BUG=587175 ========== to ========== Ensure that BlinkTestRunner::TestFinished is only called when main frame is local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. BUG=587175 ==========
lukasza@chromium.org changed reviewers: + jochen@chromium.org
jochen@, can you please take a look?
https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/... File content/shell/renderer/layout_test/blink_test_runner.cc (right): https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/... content/shell/renderer/layout_test/blink_test_runner.cc:614: if (!is_main_window_ || !render_view()->GetMainRenderFrame()) { ah, so you consider all OOPIF of the main window to be part of the main window? what if you have a test which opens a window in a different domain, and has an iframe from that different domain in the main window? won't the other window and the oopif end up in the same process then?
https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/... File content/shell/renderer/layout_test/blink_test_runner.cc (right): https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/... content/shell/renderer/layout_test/blink_test_runner.cc:614: if (!is_main_window_ || !render_view()->GetMainRenderFrame()) { On 2016/03/04 12:38:52, jochen wrote: > ah, so you consider all OOPIF of the main window to be part of the main window? Correct, except to be precise s/OOPIF/RenderViews/ (i.e. each rendererer containing a frame from the main window will also have a RenderView + BlinkTestRunner associated with the window/page-level stuff). > what if you have a test which opens a window in a different domain, and has an > iframe from that different domain in the main window? won't the other window and > the oopif end up in the same process then? They will be in the same process, but they will have 2 separate RenderViews. Creation of both RenderViews will go through LayoutTestContentRendererClient::WebTestProxyCreated, so they both will have an associated BlinkTestRunner. OTOH, only one of these BlinkTestRunners will receive a SetTestConfiguration (or ReplicateTestConfiguration) message (only the one associated with the RenderView for the test's main window). So I think this is ok?
https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/... File content/shell/renderer/layout_test/blink_test_runner.cc (right): https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/... content/shell/renderer/layout_test/blink_test_runner.cc:614: if (!is_main_window_ || !render_view()->GetMainRenderFrame()) { On 2016/03/04 20:41:41, Łukasz Anforowicz wrote: > On 2016/03/04 12:38:52, jochen wrote: > > ah, so you consider all OOPIF of the main window to be part of the main > window? > > Correct, except to be precise s/OOPIF/RenderViews/ (i.e. each rendererer > containing a frame from the main window will also have a RenderView + > BlinkTestRunner associated with the window/page-level stuff). > > > what if you have a test which opens a window in a different domain, and has an > > iframe from that different domain in the main window? won't the other window > and > > the oopif end up in the same process then? > > They will be in the same process, but they will have 2 separate RenderViews. > Creation of both RenderViews will go through > LayoutTestContentRendererClient::WebTestProxyCreated, so they both will have an > associated BlinkTestRunner. OTOH, only one of these BlinkTestRunners will > receive a SetTestConfiguration (or ReplicateTestConfiguration) message (only the > one associated with the RenderView for the test's main window). So I think this > is ok? i.e. only one of the BlinkTestRunner's will have |is_main_window_| set to true.
Description was changed from ========== Ensure that BlinkTestRunner::TestFinished is only called when main frame is local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. BUG=587175 ========== to ========== Quit BlinkTestRunner::TestFinished early if main frame is not local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. Note - this CL prevents a crash in a future CL (https://crrev.com/1750063002), by enforcing the assumption described above (and exiting early if the assumption doesn't hold). OTOH, this CL does NOT actually cause ShellViewHostMsg_TestFinishedInSecondaryRenderer to be delivered to the browser in all the cases - there are extra issues that prevent that from happening (these issues are addressed in a later CL proposed at https://crrev.com/1765623003/). Not delivering the message is not harmless and actually prevents test failures at this point (when runtime test flags are not yet delivered - until we land https://crrev.com/1715573002/). BUG=587175 ==========
Description was changed from ========== Quit BlinkTestRunner::TestFinished early if main frame is not local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. Note - this CL prevents a crash in a future CL (https://crrev.com/1750063002), by enforcing the assumption described above (and exiting early if the assumption doesn't hold). OTOH, this CL does NOT actually cause ShellViewHostMsg_TestFinishedInSecondaryRenderer to be delivered to the browser in all the cases - there are extra issues that prevent that from happening (these issues are addressed in a later CL proposed at https://crrev.com/1765623003/). Not delivering the message is not harmless and actually prevents test failures at this point (when runtime test flags are not yet delivered - until we land https://crrev.com/1715573002/). BUG=587175 ========== to ========== Quit BlinkTestRunner::TestFinished early if main frame is not local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. Note - this CL prevents a crash in a future CL (https://crrev.com/1750063002), by enforcing the assumption described above (and exiting early if the assumption doesn't hold). OTOH, this CL does NOT actually cause ShellViewHostMsg_TestFinishedInSecondaryRenderer to be delivered to the browser in all the cases - there are extra issues that prevent that from happening (these issues are addressed in a later CL proposed at https://crrev.com/1765623003/). Not delivering the message is not harmless and actually prevents test failures at this point (when runtime test flags are not yet delivered - until we land https://crrev.com/1715573002/). BUG=587175 ==========
Description was changed from ========== Quit BlinkTestRunner::TestFinished early if main frame is not local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. Note - this CL prevents a crash in a future CL (https://crrev.com/1750063002), by enforcing the assumption described above (and exiting early if the assumption doesn't hold). OTOH, this CL does NOT actually cause ShellViewHostMsg_TestFinishedInSecondaryRenderer to be delivered to the browser in all the cases - there are extra issues that prevent that from happening (these issues are addressed in a later CL proposed at https://crrev.com/1765623003/). Not delivering the message is not harmless and actually prevents test failures at this point (when runtime test flags are not yet delivered - until we land https://crrev.com/1715573002/). BUG=587175 ========== to ========== Quit BlinkTestRunner::TestFinished early if main frame is not local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. Note - this CL prevents a crash in a future CL (https://crrev.com/1750063002), by enforcing the assumption described above (and exiting early if the assumption doesn't hold). OTOH, this CL does NOT actually cause ShellViewHostMsg_TestFinishedInSecondaryRenderer to be delivered to the browser in all the cases - there are extra issues that prevent that from happening (these issues are addressed in a later CL proposed at https://crrev.com/1765623003/). Not delivering the message is harmless and actually prevents test failures at this point (when runtime test flags are not yet replicated - until we land https://crrev.com/1715573002/). BUG=587175 ==========
lgtm
The CQ bit was checked by lukasza@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1746393002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1746393002/40001
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Quit BlinkTestRunner::TestFinished early if main frame is not local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. Note - this CL prevents a crash in a future CL (https://crrev.com/1750063002), by enforcing the assumption described above (and exiting early if the assumption doesn't hold). OTOH, this CL does NOT actually cause ShellViewHostMsg_TestFinishedInSecondaryRenderer to be delivered to the browser in all the cases - there are extra issues that prevent that from happening (these issues are addressed in a later CL proposed at https://crrev.com/1765623003/). Not delivering the message is harmless and actually prevents test failures at this point (when runtime test flags are not yet replicated - until we land https://crrev.com/1715573002/). BUG=587175 ========== to ========== Quit BlinkTestRunner::TestFinished early if main frame is not local. content::BlinkTestRunner::TestFinished assumes that main frame is local. This assumption only accidentally holds true today when running layout tests with --site-per-process flag - it holds true with OOPIFs, because today OOPIFs do not receive ShellViewMsg_SetTestConfiguration message which means that BlinkTestRunner::is_main_window_ is set to false in OOPIFs (even if they actually *are* in the main window). This assumption is needed for test_runner::TestRunner::CheckResponseMimeType and for the call to test_runner::DumpLayout from BlinkTestRunner::CaptureDump (which targets the main frame only). This CL makes sure that the assumption will hold true even if an equivalent of ShellViewMsg_SetTestConfiguration message is sent to OOPIFs in the future (i.e. after crrev.com/1750063002). This is done, by having OOPIFs ask the browser to forward TestFinished to the BlinkTestRunner where main frame is local (similarily to how this was already asked from renderers associated with secondary test windows). Because of this change, ...SecondaryWindow... is replaced with ...SecondaryRenderer... where applicable. Note - this CL prevents a crash in a future CL (https://crrev.com/1750063002), by enforcing the assumption described above (and exiting early if the assumption doesn't hold). OTOH, this CL does NOT actually cause ShellViewHostMsg_TestFinishedInSecondaryRenderer to be delivered to the browser in all the cases - there are extra issues that prevent that from happening (these issues are addressed in a later CL proposed at https://crrev.com/1765623003/). Not delivering the message is harmless and actually prevents test failures at this point (when runtime test flags are not yet replicated - until we land https://crrev.com/1715573002/). BUG=587175 Committed: https://crrev.com/f6b148302e76a6450d87ea49ef9e6f9836ca2639 Cr-Commit-Position: refs/heads/master@{#379870} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/f6b148302e76a6450d87ea49ef9e6f9836ca2639 Cr-Commit-Position: refs/heads/master@{#379870} |