DescriptionOOPIF 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... #Messages
Total messages: 16 (7 generated)
|