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