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

Issue 1589643003: OOPIF support for testRunner.dumpAsText and similar layout dumps. (Closed)

Created:
4 years, 11 months ago by Łukasz Anforowicz
Modified:
4 years, 11 months ago
Reviewers:
Mike West
CC:
asanka, chromium-reviews, creis+watch_chromium.org, 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, nasko+codewatch_chromium.org, Peter Beverloo, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

OOPIF support for testRunner.dumpAsText and similar layout dumps. Layout Tests dump page contents (to compare against expected results). The dump can include frame contents (i.e. dump as text, dump as markup, dump scroll positions with extra flavors like dump as printed, dump line box trees, etc.). Since renderer process is (for security / by design) not able to see frame contents of remote frames, it means that old Layout Tests code is not able to dump frame contents when site isolation is enabled (i.e. when running with --additional-drt-flag=--site-per-process). This CL is a step toward making layout tests compatible with site isolation. After this CL, if recursing over all frames is required, then BlinkTestRunner::CaptureDump will ask the browser process for stiching together the frame contents, before continuing with the other dump flavors in BlinkTestRunner::OnLayoutDumpCompleted. The above means testRunner.notifyDone() might no longer perform dumps synchronously. This is okay, because: - The dumps were already performed asynchronously in some cases: - pixel dumps (i.e. see how dumping is resumed after BlinkTestRunner::CaptureDumpPixels aka OnPixelsDumpCompleted), - ShouldDumpBackForwardList (i.e. see how dumping is resumed after BlinkTestRunner::OnSessionHistory), - the case where notifyDone is called from a secondary window (i.e. see how BlinkTestRunner::TestFinished asks the browser to continue in the main window). - The synchronous dumps are still performed if the test didn't ask for recursing over all the frames. Retaining the synchronous behavior in this case is needed, because in some tests the dump is captured while the frame is being detached (and would no longer be present after an extra hop to the browser process). This CL doesn't affect the following dump modes (which for now remain potentially incompatible with OOPIFs): dump as audio, dump as custom text, dump pixels, dump back/forward list). Additionally, setting and reading of dump modes is done in a renderer process (which can be incompatible with OOPIFs when testRunner.dumpAsText() and testRunner.notifyDone() are called in cross-site frames running in different renderer processes). BUG=477150 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/a8960461e06e8478f79fde21531e237443b5629f Cr-Commit-Position: refs/heads/master@{#371896}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : Ready for review. #

Total comments: 7

Patch Set 6 : Merged 3 mutually exclusive bools into a LayoutDumpMode enum. #

Patch Set 7 : Revert unnecessary test changes. #

Patch Set 8 : Rebasing... #

Patch Set 9 : Adding a missing "break" in a switch statement :-/ #

Patch Set 10 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+432 lines, -128 lines) Patch
M components/test_runner/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
A components/test_runner/layout_dump.h View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
A components/test_runner/layout_dump.cc View 1 2 3 4 5 6 7 8 1 chunk +98 lines, -0 lines 0 comments Download
A components/test_runner/layout_dump_flags.h View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
M components/test_runner/test_runner.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/test_runner/test_runner.cc View 1 2 3 4 5 1 chunk +30 lines, -0 lines 0 comments Download
M components/test_runner/test_runner.gyp View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M components/test_runner/web_test_proxy.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M components/test_runner/web_test_proxy.cc View 1 2 3 chunks +15 lines, -107 lines 0 comments Download
M components/test_runner/web_test_runner.h View 2 chunks +12 lines, -0 lines 0 comments Download
M content/shell/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/browser/blink_test_controller.h View 1 2 3 4 5 6 7 8 9 6 chunks +12 lines, -0 lines 0 comments Download
M content/shell/browser/blink_test_controller.cc View 1 2 3 4 5 6 7 8 9 7 chunks +73 lines, -0 lines 0 comments Download
M content/shell/common/shell_messages.h View 1 2 3 4 5 3 chunks +33 lines, -0 lines 0 comments Download
M content/shell/renderer/layout_test/blink_test_runner.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M content/shell/renderer/layout_test/blink_test_runner.cc View 1 2 3 4 5 6 7 3 chunks +60 lines, -20 lines 0 comments Download
M content/shell/renderer/layout_test/layout_test_render_frame_observer.h View 2 chunks +9 lines, -0 lines 0 comments Download
M content/shell/renderer/layout_test/layout_test_render_frame_observer.cc View 2 chunks +24 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
Łukasz Anforowicz
Mike, could you please take a look? https://codereview.chromium.org/1589643003/diff/80001/components/test_runner/layout_dump.cc File components/test_runner/layout_dump.cc (right): https://codereview.chromium.org/1589643003/diff/80001/components/test_runner/layout_dump.cc#newcode24 components/test_runner/layout_dump.cc:24: std::string DumpFrameHeaderIfNeeded(WebFrame* ...
4 years, 11 months ago (2016-01-21 00:27:08 UTC) #4
Łukasz Anforowicz
BTW: I have looked at the linux_blink_dbg trybot failures and I think it is ok ...
4 years, 11 months ago (2016-01-21 18:30:07 UTC) #5
Mike West
Assuming the bots are happy, moving things around in this way looks pretty reasonable to ...
4 years, 11 months ago (2016-01-22 19:58:56 UTC) #6
dcheng
https://codereview.chromium.org/1589643003/diff/80001/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.text-custom-font-load-crash.html File third_party/WebKit/LayoutTests/canvas/philip/tests/2d.text-custom-font-load-crash.html (right): https://codereview.chromium.org/1589643003/diff/80001/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.text-custom-font-load-crash.html#newcode28 third_party/WebKit/LayoutTests/canvas/philip/tests/2d.text-custom-font-load-crash.html:28: _assert(true, "Test passes if it does not crash.") Not ...
4 years, 11 months ago (2016-01-23 05:17:33 UTC) #7
Łukasz Anforowicz
On 2016/01/22 19:58:56, Mike West wrote: > Assuming the bots are happy, moving things around ...
4 years, 11 months ago (2016-01-26 00:50:03 UTC) #8
Łukasz Anforowicz
Trybot failures in patch set 9 are not related to the changes in this CL ...
4 years, 11 months ago (2016-01-27 21:16:26 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1589643003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1589643003/180001
4 years, 11 months ago (2016-01-27 21:34:07 UTC) #13
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 11 months ago (2016-01-27 22:27:40 UTC) #14
commit-bot: I haz the power
4 years, 11 months ago (2016-01-27 22:28:52 UTC) #16
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/a8960461e06e8478f79fde21531e237443b5629f
Cr-Commit-Position: refs/heads/master@{#371896}

Powered by Google App Engine
This is Rietveld 408576698