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

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: Ready for review. 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
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..1a1a5c928209c95902a21c391d95a08312c71a1d 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -1863,6 +1863,34 @@ void TestRunner::GetAudioData(std::vector<unsigned char>* buffer_view) const {
*buffer_view = audio_data_;
}
+LayoutDumpFlags TestRunner::GetLayoutDumpFlags() {
+ LayoutDumpFlags result;
+
+ result.dump_as_text = shouldDumpAsText();
+ result.dump_as_markup = shouldDumpAsMarkup();
+ result.dump_scroll_positions = !shouldDumpAsText() && !shouldDumpAsMarkup();
+
+ result.dump_as_printed = isPrinting();
+
+ result.dump_child_frames =
+ (result.dump_as_text && shouldDumpChildFramesAsText()) ||
+ (result.dump_as_markup && shouldDumpChildFramesAsMarkup()) ||
+ (result.dump_scroll_positions && shouldDumpChildFrameScrollPositions());
+
+ 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_;
}

Powered by Google App Engine
This is Rietveld 408576698