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