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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1689283003: Remove duplication between TestRunner's fields and LayoutDumpFlags struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Despite LayoutDumpFlags constructor, we still need to set the flags in TestRunner::Reset. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/renderer/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <clocale> 9 #include <clocale>
10 #include <cmath> 10 #include <cmath>
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 CaptureDumpContinued(); 885 CaptureDumpContinued();
886 return; 886 return;
887 } 887 }
888 888
889 test_runner::LayoutDumpFlags layout_dump_flags = 889 test_runner::LayoutDumpFlags layout_dump_flags =
890 interfaces->TestRunner()->GetLayoutDumpFlags(); 890 interfaces->TestRunner()->GetLayoutDumpFlags();
891 layout_dump_flags.dump_line_box_trees = 891 layout_dump_flags.dump_line_box_trees =
892 base::CommandLine::ForCurrentProcess()->HasSwitch( 892 base::CommandLine::ForCurrentProcess()->HasSwitch(
893 switches::kDumpLineBoxTrees); 893 switches::kDumpLineBoxTrees);
894 894
895 if (!layout_dump_flags.dump_child_frames) { 895 if (!layout_dump_flags.dump_child_frames()) {
896 std::string layout_dump = DumpLayout( 896 std::string layout_dump = DumpLayout(
897 render_view()->GetMainRenderFrame()->GetWebFrame(), layout_dump_flags); 897 render_view()->GetMainRenderFrame()->GetWebFrame(), layout_dump_flags);
898 OnLayoutDumpCompleted(layout_dump); 898 OnLayoutDumpCompleted(layout_dump);
899 return; 899 return;
900 } 900 }
901 901
902 Send( 902 Send(
903 new ShellViewHostMsg_InitiateLayoutDump(routing_id(), layout_dump_flags)); 903 new ShellViewHostMsg_InitiateLayoutDump(routing_id(), layout_dump_flags));
904 // OnLayoutDumpCompleted will be eventually called by an IPC from the browser. 904 // OnLayoutDumpCompleted will be eventually called by an IPC from the browser.
905 } 905 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 get_bluetooth_events_callbacks_.pop_front(); 1031 get_bluetooth_events_callbacks_.pop_front();
1032 callback.Run(events); 1032 callback.Run(events);
1033 } 1033 }
1034 1034
1035 void BlinkTestRunner::ReportLeakDetectionResult( 1035 void BlinkTestRunner::ReportLeakDetectionResult(
1036 const LeakDetectionResult& report) { 1036 const LeakDetectionResult& report) {
1037 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1037 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1038 } 1038 }
1039 1039
1040 } // namespace content 1040 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/common/shell_messages.h ('k') | content/shell/renderer/layout_test/layout_test_render_frame_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698