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