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