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_; |
} |