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_service.h" | |
39 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" | 38 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" |
40 #include "content/shell/renderer/test_runner/web_task.h" | 39 #include "content/shell/renderer/test_runner/web_task.h" |
41 #include "content/shell/renderer/test_runner/web_test_interfaces.h" | 40 #include "content/shell/renderer/test_runner/web_test_interfaces.h" |
42 #include "content/shell/renderer/test_runner/web_test_proxy.h" | 41 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
43 #include "content/shell/renderer/test_runner/web_test_runner.h" | 42 #include "content/shell/renderer/test_runner/web_test_runner.h" |
44 #include "net/base/filename_util.h" | 43 #include "net/base/filename_util.h" |
45 #include "net/base/net_errors.h" | 44 #include "net/base/net_errors.h" |
46 #include "skia/ext/platform_canvas.h" | 45 #include "skia/ext/platform_canvas.h" |
47 #include "third_party/WebKit/public/platform/Platform.h" | 46 #include "third_party/WebKit/public/platform/Platform.h" |
48 #include "third_party/WebKit/public/platform/WebCString.h" | 47 #include "third_party/WebKit/public/platform/WebCString.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 MockScreenOrientationClient* mock_client = | 241 MockScreenOrientationClient* mock_client = |
243 proxy()->GetScreenOrientationClientMock(); | 242 proxy()->GetScreenOrientationClientMock(); |
244 mock_client->ResetData(); | 243 mock_client->ResetData(); |
245 } | 244 } |
246 | 245 |
247 void WebKitTestRunner::DidChangeBatteryStatus( | 246 void WebKitTestRunner::DidChangeBatteryStatus( |
248 const blink::WebBatteryStatus& status) { | 247 const blink::WebBatteryStatus& status) { |
249 MockBatteryStatusChanged(status); | 248 MockBatteryStatusChanged(status); |
250 } | 249 } |
251 | 250 |
252 void WebKitTestRunner::SetScreenAvailability(bool available) { | |
253 proxy()->GetPresentationServiceMock()->SetScreenAvailability(available); | |
254 } | |
255 | |
256 void WebKitTestRunner::ResetPresentationService() { | |
257 proxy()->GetPresentationServiceMock()->Reset(); | |
258 } | |
259 | |
260 void WebKitTestRunner::PrintMessage(const std::string& message) { | 251 void WebKitTestRunner::PrintMessage(const std::string& message) { |
261 Send(new ShellViewHostMsg_PrintMessage(routing_id(), message)); | 252 Send(new ShellViewHostMsg_PrintMessage(routing_id(), message)); |
262 } | 253 } |
263 | 254 |
264 void WebKitTestRunner::PostTask(WebTask* task) { | 255 void WebKitTestRunner::PostTask(WebTask* task) { |
265 Platform::current()->currentThread()->postTask( | 256 Platform::current()->currentThread()->postTask( |
266 new InvokeTaskHelper(make_scoped_ptr(task))); | 257 new InvokeTaskHelper(make_scoped_ptr(task))); |
267 } | 258 } |
268 | 259 |
269 void WebKitTestRunner::PostDelayedTask(WebTask* task, long long ms) { | 260 void WebKitTestRunner::PostDelayedTask(WebTask* task, long long ms) { |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 | 777 |
787 leak_detector_->TryLeakDetection(main_frame); | 778 leak_detector_->TryLeakDetection(main_frame); |
788 } | 779 } |
789 | 780 |
790 void WebKitTestRunner::ReportLeakDetectionResult( | 781 void WebKitTestRunner::ReportLeakDetectionResult( |
791 const LeakDetectionResult& report) { | 782 const LeakDetectionResult& report) { |
792 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 783 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
793 } | 784 } |
794 | 785 |
795 } // namespace content | 786 } // namespace content |
OLD | NEW |