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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <clocale> | 10 #include <clocale> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "base/values.h" | 31 #include "base/values.h" |
32 #include "build/build_config.h" | 32 #include "build/build_config.h" |
33 #include "components/plugins/renderer/plugin_placeholder.h" | 33 #include "components/plugins/renderer/plugin_placeholder.h" |
34 #include "components/test_runner/gamepad_controller.h" | 34 #include "components/test_runner/gamepad_controller.h" |
35 #include "components/test_runner/layout_and_paint_async_then.h" | 35 #include "components/test_runner/layout_and_paint_async_then.h" |
36 #include "components/test_runner/pixel_dump.h" | 36 #include "components/test_runner/pixel_dump.h" |
37 #include "components/test_runner/web_test_interfaces.h" | 37 #include "components/test_runner/web_test_interfaces.h" |
38 #include "components/test_runner/web_test_proxy.h" | 38 #include "components/test_runner/web_test_proxy.h" |
39 #include "components/test_runner/web_test_runner.h" | 39 #include "components/test_runner/web_test_runner.h" |
40 #include "content/public/common/content_switches.h" | 40 #include "content/public/common/content_switches.h" |
41 #include "content/public/common/service_registry.h" | |
42 #include "content/public/common/url_constants.h" | 41 #include "content/public/common/url_constants.h" |
43 #include "content/public/common/web_preferences.h" | 42 #include "content/public/common/web_preferences.h" |
44 #include "content/public/renderer/media_stream_utils.h" | 43 #include "content/public/renderer/media_stream_utils.h" |
45 #include "content/public/renderer/render_frame.h" | 44 #include "content/public/renderer/render_frame.h" |
46 #include "content/public/renderer/render_view.h" | 45 #include "content/public/renderer/render_view.h" |
47 #include "content/public/renderer/render_view_visitor.h" | 46 #include "content/public/renderer/render_view_visitor.h" |
48 #include "content/public/renderer/renderer_gamepad_provider.h" | 47 #include "content/public/renderer/renderer_gamepad_provider.h" |
49 #include "content/public/test/layouttest_support.h" | 48 #include "content/public/test/layouttest_support.h" |
50 #include "content/shell/common/layout_test/layout_test_messages.h" | 49 #include "content/shell/common/layout_test/layout_test_messages.h" |
51 #include "content/shell/common/shell_messages.h" | 50 #include "content/shell/common/shell_messages.h" |
52 #include "content/shell/common/shell_switches.h" | 51 #include "content/shell/common/shell_switches.h" |
53 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 52 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
54 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" | 53 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" |
55 #include "content/shell/renderer/layout_test/leak_detector.h" | 54 #include "content/shell/renderer/layout_test/leak_detector.h" |
56 #include "media/base/audio_capturer_source.h" | 55 #include "media/base/audio_capturer_source.h" |
57 #include "media/base/audio_parameters.h" | 56 #include "media/base/audio_parameters.h" |
58 #include "media/base/video_capturer_source.h" | 57 #include "media/base/video_capturer_source.h" |
59 #include "net/base/filename_util.h" | 58 #include "net/base/filename_util.h" |
60 #include "net/base/net_errors.h" | 59 #include "net/base/net_errors.h" |
| 60 #include "services/shell/public/cpp/interface_provider.h" |
61 #include "skia/ext/platform_canvas.h" | 61 #include "skia/ext/platform_canvas.h" |
62 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 62 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
63 #include "third_party/WebKit/public/platform/Platform.h" | 63 #include "third_party/WebKit/public/platform/Platform.h" |
64 #include "third_party/WebKit/public/platform/WebPoint.h" | 64 #include "third_party/WebKit/public/platform/WebPoint.h" |
65 #include "third_party/WebKit/public/platform/WebRect.h" | 65 #include "third_party/WebKit/public/platform/WebRect.h" |
66 #include "third_party/WebKit/public/platform/WebSize.h" | 66 #include "third_party/WebKit/public/platform/WebSize.h" |
67 #include "third_party/WebKit/public/platform/WebString.h" | 67 #include "third_party/WebKit/public/platform/WebString.h" |
68 #include "third_party/WebKit/public/platform/WebTaskRunner.h" | 68 #include "third_party/WebKit/public/platform/WebTaskRunner.h" |
69 #include "third_party/WebKit/public/platform/WebThread.h" | 69 #include "third_party/WebKit/public/platform/WebThread.h" |
70 #include "third_party/WebKit/public/platform/WebTraceLocation.h" | 70 #include "third_party/WebKit/public/platform/WebTraceLocation.h" |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 | 922 |
923 void BlinkTestRunner::CaptureDumpComplete() { | 923 void BlinkTestRunner::CaptureDumpComplete() { |
924 render_view()->GetWebView()->mainFrame()->stopLoading(); | 924 render_view()->GetWebView()->mainFrame()->stopLoading(); |
925 | 925 |
926 Send(new ShellViewHostMsg_TestFinished(routing_id())); | 926 Send(new ShellViewHostMsg_TestFinished(routing_id())); |
927 } | 927 } |
928 | 928 |
929 mojom::LayoutTestBluetoothFakeAdapterSetter& | 929 mojom::LayoutTestBluetoothFakeAdapterSetter& |
930 BlinkTestRunner::GetBluetoothFakeAdapterSetter() { | 930 BlinkTestRunner::GetBluetoothFakeAdapterSetter() { |
931 if (!bluetooth_fake_adapter_setter_) { | 931 if (!bluetooth_fake_adapter_setter_) { |
932 RenderThread::Get()->GetServiceRegistry()->ConnectToRemoteService( | 932 RenderThread::Get()->GetRemoteInterfaces()->GetInterface( |
933 mojo::GetProxy(&bluetooth_fake_adapter_setter_)); | 933 mojo::GetProxy(&bluetooth_fake_adapter_setter_)); |
934 } | 934 } |
935 return *bluetooth_fake_adapter_setter_; | 935 return *bluetooth_fake_adapter_setter_; |
936 } | 936 } |
937 | 937 |
938 void BlinkTestRunner::OnSetupSecondaryRenderer() { | 938 void BlinkTestRunner::OnSetupSecondaryRenderer() { |
939 DCHECK(!is_main_window_); | 939 DCHECK(!is_main_window_); |
940 | 940 |
941 test_runner::WebTestInterfaces* interfaces = | 941 test_runner::WebTestInterfaces* interfaces = |
942 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); | 942 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 void BlinkTestRunner::ReportLeakDetectionResult( | 1019 void BlinkTestRunner::ReportLeakDetectionResult( |
1020 const LeakDetectionResult& report) { | 1020 const LeakDetectionResult& report) { |
1021 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1021 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
1022 } | 1022 } |
1023 | 1023 |
1024 void BlinkTestRunner::OnDestruct() { | 1024 void BlinkTestRunner::OnDestruct() { |
1025 delete this; | 1025 delete this; |
1026 } | 1026 } |
1027 | 1027 |
1028 } // namespace content | 1028 } // namespace content |
OLD | NEW |