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/webkit_test_runner.h" | 5 #include "content/shell/renderer/layout_test/webkit_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 17 matching lines...) Expand all Loading... |
28 #include "content/public/renderer/render_view_visitor.h" | 28 #include "content/public/renderer/render_view_visitor.h" |
29 #include "content/public/renderer/renderer_gamepad_provider.h" | 29 #include "content/public/renderer/renderer_gamepad_provider.h" |
30 #include "content/public/test/layouttest_support.h" | 30 #include "content/public/test/layouttest_support.h" |
31 #include "content/shell/common/layout_test/layout_test_messages.h" | 31 #include "content/shell/common/layout_test/layout_test_messages.h" |
32 #include "content/shell/common/shell_messages.h" | 32 #include "content/shell/common/shell_messages.h" |
33 #include "content/shell/common/shell_switches.h" | 33 #include "content/shell/common/shell_switches.h" |
34 #include "content/shell/common/webkit_test_helpers.h" | 34 #include "content/shell/common/webkit_test_helpers.h" |
35 #include "content/shell/renderer/layout_test/gc_controller.h" | 35 #include "content/shell/renderer/layout_test/gc_controller.h" |
36 #include "content/shell/renderer/layout_test/layout_test_render_process_observer
.h" | 36 #include "content/shell/renderer/layout_test/layout_test_render_process_observer
.h" |
37 #include "content/shell/renderer/layout_test/leak_detector.h" | 37 #include "content/shell/renderer/layout_test/leak_detector.h" |
| 38 #include "content/shell/renderer/test_runner/mock_presentation_client.h" |
38 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" | 39 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" |
39 #include "content/shell/renderer/test_runner/web_task.h" | 40 #include "content/shell/renderer/test_runner/web_task.h" |
40 #include "content/shell/renderer/test_runner/web_test_interfaces.h" | 41 #include "content/shell/renderer/test_runner/web_test_interfaces.h" |
41 #include "content/shell/renderer/test_runner/web_test_proxy.h" | 42 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
42 #include "content/shell/renderer/test_runner/web_test_runner.h" | 43 #include "content/shell/renderer/test_runner/web_test_runner.h" |
43 #include "net/base/filename_util.h" | 44 #include "net/base/filename_util.h" |
44 #include "net/base/net_errors.h" | 45 #include "net/base/net_errors.h" |
45 #include "skia/ext/platform_canvas.h" | 46 #include "skia/ext/platform_canvas.h" |
46 #include "third_party/WebKit/public/platform/Platform.h" | 47 #include "third_party/WebKit/public/platform/Platform.h" |
47 #include "third_party/WebKit/public/platform/WebCString.h" | 48 #include "third_party/WebKit/public/platform/WebCString.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 MockScreenOrientationClient* mock_client = | 242 MockScreenOrientationClient* mock_client = |
242 proxy()->GetScreenOrientationClientMock(); | 243 proxy()->GetScreenOrientationClientMock(); |
243 mock_client->ResetData(); | 244 mock_client->ResetData(); |
244 } | 245 } |
245 | 246 |
246 void WebKitTestRunner::DidChangeBatteryStatus( | 247 void WebKitTestRunner::DidChangeBatteryStatus( |
247 const blink::WebBatteryStatus& status) { | 248 const blink::WebBatteryStatus& status) { |
248 MockBatteryStatusChanged(status); | 249 MockBatteryStatusChanged(status); |
249 } | 250 } |
250 | 251 |
| 252 void WebKitTestRunner::SetScreenAvailability(bool available) { |
| 253 MockPresentationClient* mock_client = proxy()->GetPresentationClientMock(); |
| 254 mock_client->SetScreenAvailability(available); |
| 255 } |
| 256 |
251 void WebKitTestRunner::PrintMessage(const std::string& message) { | 257 void WebKitTestRunner::PrintMessage(const std::string& message) { |
252 Send(new ShellViewHostMsg_PrintMessage(routing_id(), message)); | 258 Send(new ShellViewHostMsg_PrintMessage(routing_id(), message)); |
253 } | 259 } |
254 | 260 |
255 void WebKitTestRunner::PostTask(WebTask* task) { | 261 void WebKitTestRunner::PostTask(WebTask* task) { |
256 Platform::current()->currentThread()->postTask( | 262 Platform::current()->currentThread()->postTask( |
257 new InvokeTaskHelper(make_scoped_ptr(task))); | 263 new InvokeTaskHelper(make_scoped_ptr(task))); |
258 } | 264 } |
259 | 265 |
260 void WebKitTestRunner::PostDelayedTask(WebTask* task, long long ms) { | 266 void WebKitTestRunner::PostDelayedTask(WebTask* task, long long ms) { |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 | 783 |
778 leak_detector_->TryLeakDetection(main_frame); | 784 leak_detector_->TryLeakDetection(main_frame); |
779 } | 785 } |
780 | 786 |
781 void WebKitTestRunner::ReportLeakDetectionResult( | 787 void WebKitTestRunner::ReportLeakDetectionResult( |
782 const LeakDetectionResult& report) { | 788 const LeakDetectionResult& report) { |
783 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 789 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
784 } | 790 } |
785 | 791 |
786 } // namespace content | 792 } // namespace content |
OLD | NEW |