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

Unified Diff: components/test_runner/web_test_proxy.cc

Issue 1185563002: Add --dump-line-box-trees parameter to content_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 6 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/web_test_proxy.cc
diff --git a/components/test_runner/web_test_proxy.cc b/components/test_runner/web_test_proxy.cc
index 766459d30835f462fe8612710ce9bcaba15d8a72..6c5e98b45d371589859036ccd784de09f5624d55 100644
--- a/components/test_runner/web_test_proxy.cc
+++ b/components/test_runner/web_test_proxy.cc
@@ -456,7 +456,9 @@ void WebTestProxyBase::ShowValidationMessage(
base::UTF16ToUTF8(sub_message) + "\n");
}
-std::string WebTestProxyBase::CaptureTree(bool debug_render_tree) {
+std::string WebTestProxyBase::CaptureTree(
+ bool debug_render_tree,
+ bool dump_line_box_trees) {
bool should_dump_custom_text =
test_interfaces_->GetTestRunner()->shouldDumpAsCustomText();
bool should_dump_as_text =
@@ -489,6 +491,8 @@ std::string WebTestProxyBase::CaptureTree(bool debug_render_tree) {
layout_text_behavior |= blink::WebFrame::LayoutAsTextPrinting;
if (debug_render_tree)
layout_text_behavior |= blink::WebFrame::LayoutAsTextDebug;
+ if (dump_line_box_trees)
+ layout_text_behavior |= blink::WebFrame::LayoutAsTextWithLineTrees;
data_utf8 = frame->layoutTreeAsText(layout_text_behavior).utf8();
data_utf8 += DumpFrameScrollPosition(frame, recursive);
}

Powered by Google App Engine
This is Rietveld 408576698