| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <clocale> | 8 #include <clocale> |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 void BlinkTestRunner::CaptureDump() { | 777 void BlinkTestRunner::CaptureDump() { |
| 778 test_runner::WebTestInterfaces* interfaces = | 778 test_runner::WebTestInterfaces* interfaces = |
| 779 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces(); | 779 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces(); |
| 780 TRACE_EVENT0("shell", "BlinkTestRunner::CaptureDump"); | 780 TRACE_EVENT0("shell", "BlinkTestRunner::CaptureDump"); |
| 781 | 781 |
| 782 if (interfaces->TestRunner()->ShouldDumpAsAudio()) { | 782 if (interfaces->TestRunner()->ShouldDumpAsAudio()) { |
| 783 std::vector<unsigned char> vector_data; | 783 std::vector<unsigned char> vector_data; |
| 784 interfaces->TestRunner()->GetAudioData(&vector_data); | 784 interfaces->TestRunner()->GetAudioData(&vector_data); |
| 785 Send(new ShellViewHostMsg_AudioDump(routing_id(), vector_data)); | 785 Send(new ShellViewHostMsg_AudioDump(routing_id(), vector_data)); |
| 786 } else { | 786 } else { |
| 787 Send(new ShellViewHostMsg_TextDump(routing_id(), | 787 const base::CommandLine& command_line = |
| 788 proxy()->CaptureTree(false))); | 788 *base::CommandLine::ForCurrentProcess(); |
| 789 Send(new ShellViewHostMsg_TextDump( |
| 790 routing_id(), proxy()->CaptureTree( |
| 791 false, command_line.HasSwitch(switches::kDumpLineBoxTrees)))); |
| 789 | 792 |
| 790 if (test_config_.enable_pixel_dumping && | 793 if (test_config_.enable_pixel_dumping && |
| 791 interfaces->TestRunner()->ShouldGeneratePixelResults()) { | 794 interfaces->TestRunner()->ShouldGeneratePixelResults()) { |
| 792 CHECK(render_view()->GetWebView()->isAcceleratedCompositingActive()); | 795 CHECK(render_view()->GetWebView()->isAcceleratedCompositingActive()); |
| 793 proxy()->CapturePixelsAsync(base::Bind( | 796 proxy()->CapturePixelsAsync(base::Bind( |
| 794 &BlinkTestRunner::CaptureDumpPixels, base::Unretained(this))); | 797 &BlinkTestRunner::CaptureDumpPixels, base::Unretained(this))); |
| 795 return; | 798 return; |
| 796 } | 799 } |
| 797 } | 800 } |
| 798 | 801 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 | 895 |
| 893 leak_detector_->TryLeakDetection(main_frame); | 896 leak_detector_->TryLeakDetection(main_frame); |
| 894 } | 897 } |
| 895 | 898 |
| 896 void BlinkTestRunner::ReportLeakDetectionResult( | 899 void BlinkTestRunner::ReportLeakDetectionResult( |
| 897 const LeakDetectionResult& report) { | 900 const LeakDetectionResult& report) { |
| 898 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 901 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 899 } | 902 } |
| 900 | 903 |
| 901 } // namespace content | 904 } // namespace content |
| OLD | NEW |