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

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: 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 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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 CaptureDumpContinued(); 884 CaptureDumpContinued();
885 return; 885 return;
886 } 886 }
887 887
888 test_runner::LayoutDumpFlags layout_dump_flags = 888 test_runner::LayoutDumpFlags layout_dump_flags =
889 interfaces->TestRunner()->GetLayoutDumpFlags(); 889 interfaces->TestRunner()->GetLayoutDumpFlags();
890 layout_dump_flags.dump_line_box_trees = 890 layout_dump_flags.dump_line_box_trees =
891 base::CommandLine::ForCurrentProcess()->HasSwitch( 891 base::CommandLine::ForCurrentProcess()->HasSwitch(
892 switches::kDumpLineBoxTrees); 892 switches::kDumpLineBoxTrees);
893 893
894 if (!layout_dump_flags.dump_child_frames) { 894 if (!layout_dump_flags.dump_child_frames()) {
895 std::string layout_dump = DumpLayout( 895 std::string layout_dump = DumpLayout(
896 render_view()->GetMainRenderFrame()->GetWebFrame(), layout_dump_flags); 896 render_view()->GetMainRenderFrame()->GetWebFrame(), layout_dump_flags);
897 OnLayoutDumpCompleted(layout_dump); 897 OnLayoutDumpCompleted(layout_dump);
898 return; 898 return;
899 } 899 }
900 900
901 Send( 901 Send(
902 new ShellViewHostMsg_InitiateLayoutDump(routing_id(), layout_dump_flags)); 902 new ShellViewHostMsg_InitiateLayoutDump(routing_id(), layout_dump_flags));
903 // OnLayoutDumpCompleted will be eventually called by an IPC from the browser. 903 // OnLayoutDumpCompleted will be eventually called by an IPC from the browser.
904 } 904 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 get_bluetooth_events_callbacks_.pop_front(); 1030 get_bluetooth_events_callbacks_.pop_front();
1031 callback.Run(events); 1031 callback.Run(events);
1032 } 1032 }
1033 1033
1034 void BlinkTestRunner::ReportLeakDetectionResult( 1034 void BlinkTestRunner::ReportLeakDetectionResult(
1035 const LeakDetectionResult& report) { 1035 const LeakDetectionResult& report) {
1036 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1036 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1037 } 1037 }
1038 1038
1039 } // namespace content 1039 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698