OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/test_runner/web_test_interfaces.h" | 5 #include "components/test_runner/web_test_interfaces.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "components/test_runner/app_banner_client.h" | 10 #include "components/test_runner/app_banner_client.h" |
11 #include "components/test_runner/mock_web_audio_device.h" | 11 #include "components/test_runner/mock_web_audio_device.h" |
12 #include "components/test_runner/mock_web_media_stream_center.h" | 12 #include "components/test_runner/mock_web_media_stream_center.h" |
13 #include "components/test_runner/mock_web_midi_accessor.h" | 13 #include "components/test_runner/mock_web_midi_accessor.h" |
14 #include "components/test_runner/mock_webrtc_peer_connection_handler.h" | 14 #include "components/test_runner/mock_webrtc_peer_connection_handler.h" |
15 #include "components/test_runner/test_interfaces.h" | 15 #include "components/test_runner/test_interfaces.h" |
16 #include "components/test_runner/test_runner.h" | 16 #include "components/test_runner/test_runner.h" |
17 #include "components/test_runner/web_frame_test_client.h" | 17 #include "components/test_runner/web_frame_test_client.h" |
18 #include "components/test_runner/web_view_test_client.h" | 18 #include "components/test_runner/web_view_test_client.h" |
19 #include "components/test_runner/web_view_test_proxy.h" | 19 #include "components/test_runner/web_view_test_proxy.h" |
20 #include "components/test_runner/web_widget_test_client.h" | 20 #include "components/test_runner/web_widget_test_client.h" |
| 21 #include "components/test_runner/web_widget_test_proxy.h" |
21 | 22 |
22 using namespace blink; | 23 using namespace blink; |
23 | 24 |
24 namespace test_runner { | 25 namespace test_runner { |
25 | 26 |
26 WebTestInterfaces::WebTestInterfaces() : interfaces_(new TestInterfaces()) { | 27 WebTestInterfaces::WebTestInterfaces() : interfaces_(new TestInterfaces()) { |
27 } | 28 } |
28 | 29 |
29 WebTestInterfaces::~WebTestInterfaces() { | 30 WebTestInterfaces::~WebTestInterfaces() { |
30 } | 31 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 99 } |
99 | 100 |
100 std::unique_ptr<WebViewTestClient> WebTestInterfaces::CreateWebViewTestClient( | 101 std::unique_ptr<WebViewTestClient> WebTestInterfaces::CreateWebViewTestClient( |
101 WebViewTestProxyBase* web_view_test_proxy_base) { | 102 WebViewTestProxyBase* web_view_test_proxy_base) { |
102 return base::WrapUnique(new WebViewTestClient(interfaces_->GetTestRunner(), | 103 return base::WrapUnique(new WebViewTestClient(interfaces_->GetTestRunner(), |
103 web_view_test_proxy_base)); | 104 web_view_test_proxy_base)); |
104 } | 105 } |
105 | 106 |
106 std::unique_ptr<WebWidgetTestClient> | 107 std::unique_ptr<WebWidgetTestClient> |
107 WebTestInterfaces::CreateWebWidgetTestClient( | 108 WebTestInterfaces::CreateWebWidgetTestClient( |
108 WebViewTestProxyBase* web_view_test_proxy_base) { | 109 WebWidgetTestProxyBase* web_widget_test_proxy_base) { |
109 return base::WrapUnique(new WebWidgetTestClient(interfaces_->GetTestRunner(), | 110 return base::WrapUnique(new WebWidgetTestClient(interfaces_->GetTestRunner(), |
110 web_view_test_proxy_base)); | 111 web_widget_test_proxy_base)); |
111 } | 112 } |
112 | 113 |
113 std::vector<blink::WebView*> WebTestInterfaces::GetWindowList() { | 114 std::vector<blink::WebView*> WebTestInterfaces::GetWindowList() { |
114 std::vector<blink::WebView*> result; | 115 std::vector<blink::WebView*> result; |
115 for (WebViewTestProxyBase* proxy : interfaces_->GetWindowList()) | 116 for (WebViewTestProxyBase* proxy : interfaces_->GetWindowList()) |
116 result.push_back(proxy->web_view()); | 117 result.push_back(proxy->web_view()); |
117 return result; | 118 return result; |
118 } | 119 } |
119 | 120 |
120 } // namespace test_runner | 121 } // namespace test_runner |
OLD | NEW |