| 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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 if (test_config_.enable_pixel_dumping && | 793 if (test_config_.enable_pixel_dumping && |
| 794 interfaces->TestRunner()->ShouldGeneratePixelResults()) { | 794 interfaces->TestRunner()->ShouldGeneratePixelResults()) { |
| 795 CHECK(render_view()->GetWebView()->isAcceleratedCompositingActive()); | 795 CHECK(render_view()->GetWebView()->isAcceleratedCompositingActive()); |
| 796 proxy()->CapturePixelsAsync(base::Bind( | 796 proxy()->CapturePixelsAsync(base::Bind( |
| 797 &BlinkTestRunner::CaptureDumpPixels, base::Unretained(this))); | 797 &BlinkTestRunner::CaptureDumpPixels, base::Unretained(this))); |
| 798 return; | 798 return; |
| 799 } | 799 } |
| 800 } | 800 } |
| 801 | 801 |
| 802 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 802 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 803 switches::kEnableSlimmingPaint)) { | 803 switches::kEnableSlimmingPaint) || |
| 804 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 805 switches::kDisableSlimmingPaint)) { |
| 804 // Force a layout/paint by the end of the test to ensure test coverage of | 806 // Force a layout/paint by the end of the test to ensure test coverage of |
| 805 // incremental painting in slimming paint mode. | 807 // incremental painting in slimming paint mode. |
| 806 proxy()->LayoutAndPaintAsyncThen(base::Bind( | 808 proxy()->LayoutAndPaintAsyncThen(base::Bind( |
| 807 &BlinkTestRunner::CaptureDumpComplete, base::Unretained(this))); | 809 &BlinkTestRunner::CaptureDumpComplete, base::Unretained(this))); |
| 808 return; | 810 return; |
| 809 } | 811 } |
| 810 | 812 |
| 811 CaptureDumpComplete(); | 813 CaptureDumpComplete(); |
| 812 } | 814 } |
| 813 | 815 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 | 897 |
| 896 leak_detector_->TryLeakDetection(main_frame); | 898 leak_detector_->TryLeakDetection(main_frame); |
| 897 } | 899 } |
| 898 | 900 |
| 899 void BlinkTestRunner::ReportLeakDetectionResult( | 901 void BlinkTestRunner::ReportLeakDetectionResult( |
| 900 const LeakDetectionResult& report) { | 902 const LeakDetectionResult& report) { |
| 901 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 903 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 902 } | 904 } |
| 903 | 905 |
| 904 } // namespace content | 906 } // namespace content |
| OLD | NEW |