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

Unified Diff: components/test_runner/layout_dump_flags.h

Issue 1689283003: Remove duplication between TestRunner's fields and LayoutDumpFlags struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 10 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/layout_dump_flags.h
diff --git a/components/test_runner/layout_dump_flags.h b/components/test_runner/layout_dump_flags.h
index 5253e155fe5ab1ac76847331def50bc707f1ea8e..e76936c95fd537a5564679008f9cac4a0cd1e150 100644
--- a/components/test_runner/layout_dump_flags.h
+++ b/components/test_runner/layout_dump_flags.h
@@ -7,17 +7,42 @@
namespace test_runner {
-enum class LayoutDumpMode {
- DUMP_AS_TEXT,
- DUMP_AS_MARKUP,
- DUMP_SCROLL_POSITIONS
-};
-
struct LayoutDumpFlags {
- LayoutDumpMode main_dump_mode;
+ // If true, the test_shell will produce a plain text dump rather than a
+ // text representation of the renderer.
+ bool dump_as_text;
+
+ // If true and if dump_as_text_ is true, the test_shell will recursively
+ // dump all frames as plain text.
dcheng 2016/02/23 18:26:35 Hmm, so this implies that if I call dumpChildFrame
Łukasz Anforowicz 2016/02/23 18:45:26 Correct :-(. There are tests that do something li
Łukasz Anforowicz 2016/02/23 18:50:40 Correction - this was supposed to say: And there
+ bool dump_child_frames_as_text;
+
+ // If true, the test_shell will produce a dump of the DOM rather than a text
+ // representation of the renderer.
dcheng 2016/02/23 18:26:35 s/renderer/layout objects/ might be more accurate
Łukasz Anforowicz 2016/02/23 18:45:26 Done.
+ bool dump_as_markup;
+
+ // If true and if dump_as_markup_ is true, the test_shell will recursively
+ // produce a dump of the DOM rather than a text representation of the
+ // renderer.
+ bool dump_child_frames_as_markup;
+
+ // If true, the test_shell will print out the child frame scroll offsets as
+ // well.
+ bool dump_child_frame_scroll_positions;
+
+ // Reports whether recursing over child frames is necessary.
+ bool dump_child_frames() const {
+ if (dump_as_text)
+ return dump_child_frames_as_text;
+ else if (dump_as_markup)
+ return dump_child_frames_as_markup;
+ else
+ return dump_child_frame_scroll_positions;
+ }
+
+ // If true, layout is to target printed pages.
+ bool is_printing;
- bool dump_as_printed;
- bool dump_child_frames;
+ // Extra flags for debugging layout tests.
bool dump_line_box_trees;
bool debug_render_tree;
};

Powered by Google App Engine
This is Rietveld 408576698