| 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_test_proxy.h" | 18 #include "components/test_runner/web_test_proxy.h" |
| 19 #include "components/test_runner/web_view_test_client.h" | 19 #include "components/test_runner/web_view_test_client.h" |
| 20 #include "components/test_runner/web_widget_test_client.h" |
| 20 | 21 |
| 21 using namespace blink; | 22 using namespace blink; |
| 22 | 23 |
| 23 namespace test_runner { | 24 namespace test_runner { |
| 24 | 25 |
| 25 WebTestInterfaces::WebTestInterfaces() : interfaces_(new TestInterfaces()) { | 26 WebTestInterfaces::WebTestInterfaces() : interfaces_(new TestInterfaces()) { |
| 26 } | 27 } |
| 27 | 28 |
| 28 WebTestInterfaces::~WebTestInterfaces() { | 29 WebTestInterfaces::~WebTestInterfaces() { |
| 29 } | 30 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 interfaces_->GetDelegate(), | 95 interfaces_->GetDelegate(), |
| 95 web_test_proxy_base)); | 96 web_test_proxy_base)); |
| 96 } | 97 } |
| 97 | 98 |
| 98 std::unique_ptr<WebViewTestClient> WebTestInterfaces::CreateWebViewTestClient( | 99 std::unique_ptr<WebViewTestClient> WebTestInterfaces::CreateWebViewTestClient( |
| 99 WebTestProxyBase* web_test_proxy_base) { | 100 WebTestProxyBase* web_test_proxy_base) { |
| 100 return base::WrapUnique( | 101 return base::WrapUnique( |
| 101 new WebViewTestClient(interfaces_->GetTestRunner(), web_test_proxy_base)); | 102 new WebViewTestClient(interfaces_->GetTestRunner(), web_test_proxy_base)); |
| 102 } | 103 } |
| 103 | 104 |
| 105 std::unique_ptr<WebWidgetTestClient> |
| 106 WebTestInterfaces::CreateWebWidgetTestClient( |
| 107 WebTestProxyBase* web_test_proxy_base) { |
| 108 return base::WrapUnique(new WebWidgetTestClient(interfaces_->GetTestRunner(), |
| 109 web_test_proxy_base)); |
| 110 } |
| 111 |
| 104 std::vector<blink::WebView*> WebTestInterfaces::GetWindowList() { | 112 std::vector<blink::WebView*> WebTestInterfaces::GetWindowList() { |
| 105 std::vector<blink::WebView*> result; | 113 std::vector<blink::WebView*> result; |
| 106 for (WebTestProxyBase* proxy : interfaces_->GetWindowList()) | 114 for (WebTestProxyBase* proxy : interfaces_->GetWindowList()) |
| 107 result.push_back(proxy->web_view()); | 115 result.push_back(proxy->web_view()); |
| 108 return result; | 116 return result; |
| 109 } | 117 } |
| 110 | 118 |
| 111 } // namespace test_runner | 119 } // namespace test_runner |
| OLD | NEW |