Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Issue 1746393002: Quit BlinkTestRunner::TestFinished early if main frame is not local. (Closed)

Created:
4 years, 9 months ago by Łukasz Anforowicz
Modified:
4 years, 9 months ago
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.

Description

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}

Patch Set 1 #

Patch Set 2 : Rebasing... #

Total comments: 3

Patch Set 3 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -12 lines) Patch
M content/shell/browser/layout_test/blink_test_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/layout_test/blink_test_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/layout_test/notify_done_forwarder.h View 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/layout_test/notify_done_forwarder.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M content/shell/common/shell_messages.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M content/shell/renderer/layout_test/blink_test_runner.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (9 generated)
Łukasz Anforowicz
jochen@, can you please take a look?
4 years, 9 months ago (2016-03-03 19:05:03 UTC) #5
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/layout_test/blink_test_runner.cc File content/shell/renderer/layout_test/blink_test_runner.cc (right): https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/layout_test/blink_test_runner.cc#newcode614 content/shell/renderer/layout_test/blink_test_runner.cc:614: if (!is_main_window_ || !render_view()->GetMainRenderFrame()) { ah, so you consider ...
4 years, 9 months ago (2016-03-04 12:38:52 UTC) #6
Łukasz Anforowicz
https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/layout_test/blink_test_runner.cc File content/shell/renderer/layout_test/blink_test_runner.cc (right): https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/layout_test/blink_test_runner.cc#newcode614 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 ...
4 years, 9 months ago (2016-03-04 20:41:41 UTC) #7
Łukasz Anforowicz
https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/layout_test/blink_test_runner.cc File content/shell/renderer/layout_test/blink_test_runner.cc (right): https://codereview.chromium.org/1746393002/diff/20001/content/shell/renderer/layout_test/blink_test_runner.cc#newcode614 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 ...
4 years, 9 months ago (2016-03-04 20:51:19 UTC) #8
jochen (gone - plz use gerrit)
lgtm
4 years, 9 months ago (2016-03-08 16:23:49 UTC) #12
commit-bot: I haz the power
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
4 years, 9 months ago (2016-03-08 17:33:42 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 9 months ago (2016-03-08 18:31:07 UTC) #15
commit-bot: I haz the power
4 years, 9 months ago (2016-03-08 18:32:44 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f6b148302e76a6450d87ea49ef9e6f9836ca2639
Cr-Commit-Position: refs/heads/master@{#379870}

Powered by Google App Engine
This is Rietveld 408576698