summaryrefslogtreecommitdiffstats
path: root/components/test_runner/test_runner.h
diff options
context:
space:
mode:
authorlukasza <lukasza@chromium.org>2016-01-27 14:27:33 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-27 22:28:39 +0000
commita8960461e06e8478f79fde21531e237443b5629f (patch)
tree60f46222cbfafbfe70910d87304adb4ff43e9592 /components/test_runner/test_runner.h
parentdfd23e822ec821850cabeac8b0e372c08fe0a113 (diff)
downloadchromium_src-a8960461e06e8478f79fde21531e237443b5629f.zip
chromium_src-a8960461e06e8478f79fde21531e237443b5629f.tar.gz
chromium_src-a8960461e06e8478f79fde21531e237443b5629f.tar.bz2
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 Review URL: https://codereview.chromium.org/1589643003 Cr-Commit-Position: refs/heads/master@{#371896}
Diffstat (limited to 'components/test_runner/test_runner.h')
-rw-r--r--components/test_runner/test_runner.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/test_runner/test_runner.h b/components/test_runner/test_runner.h
index 372aff9..a7add70 100644
--- a/components/test_runner/test_runner.h
+++ b/components/test_runner/test_runner.h
@@ -72,6 +72,8 @@ class TestRunner : public WebTestRunner,
bool ShouldStayOnPageAfterHandlingBeforeUnload() const override;
bool ShouldDumpAsAudio() const override;
void GetAudioData(std::vector<unsigned char>* buffer_view) const override;
+ LayoutDumpFlags GetLayoutDumpFlags() override;
+ bool HasCustomTextDump(std::string* custom_text_dump) const override;
bool ShouldDumpBackForwardList() const override;
blink::WebContentSettingsClient* GetWebContentSettings() const override;