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

Unified Diff: components/test_runner/test_runner.cc

Issue 1589643003: OOPIF support for testRunner.dumpAsText and similar layout dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/test_runner.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index e4e5877397c06b2262916aa931f2e8f57bcd46aa..8d41bbd0b09309e6c2b9519255eb812b37f10437 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -1863,6 +1863,36 @@ void TestRunner::GetAudioData(std::vector<unsigned char>* buffer_view) const {
*buffer_view = audio_data_;
}
+LayoutDumpFlags TestRunner::GetLayoutDumpFlags() {
+ LayoutDumpFlags result;
+
+ if (shouldDumpAsText()) {
+ result.main_dump_mode = LayoutDumpMode::DUMP_AS_TEXT;
+ result.dump_child_frames = shouldDumpChildFramesAsText();
+ } else if (shouldDumpAsMarkup()) {
+ result.main_dump_mode = LayoutDumpMode::DUMP_AS_MARKUP;
+ result.dump_child_frames = shouldDumpChildFramesAsMarkup();
+ } else {
+ result.main_dump_mode = LayoutDumpMode::DUMP_SCROLL_POSITIONS;
+ result.dump_child_frames = shouldDumpChildFrameScrollPositions();
+ }
+
+ result.dump_as_printed = isPrinting();
+
+ result.dump_line_box_trees = result.debug_render_tree = false;
+
+ return result;
+}
+
+bool TestRunner::HasCustomTextDump(std::string* custom_text_dump) const {
+ if (shouldDumpAsCustomText()) {
+ *custom_text_dump = customDumpText();
+ return true;
+ }
+
+ return false;
+}
+
bool TestRunner::shouldDumpFrameLoadCallbacks() const {
return test_is_running_ && dump_frame_load_callbacks_;
}
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/test_runner.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698