OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_widget_test_client.h" | 5 #include "content/shell/test_runner/web_widget_test_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "components/test_runner/event_sender.h" | 11 #include "content/shell/test_runner/event_sender.h" |
12 #include "components/test_runner/mock_screen_orientation_client.h" | 12 #include "content/shell/test_runner/mock_screen_orientation_client.h" |
13 #include "components/test_runner/test_interfaces.h" | 13 #include "content/shell/test_runner/test_interfaces.h" |
14 #include "components/test_runner/test_runner.h" | 14 #include "content/shell/test_runner/test_runner.h" |
15 #include "components/test_runner/test_runner_for_specific_view.h" | 15 #include "content/shell/test_runner/test_runner_for_specific_view.h" |
16 #include "components/test_runner/web_test_delegate.h" | 16 #include "content/shell/test_runner/web_test_delegate.h" |
17 #include "components/test_runner/web_view_test_proxy.h" | 17 #include "content/shell/test_runner/web_view_test_proxy.h" |
18 #include "components/test_runner/web_widget_test_proxy.h" | 18 #include "content/shell/test_runner/web_widget_test_proxy.h" |
19 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 19 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
20 #include "third_party/WebKit/public/web/WebPagePopup.h" | 20 #include "third_party/WebKit/public/web/WebPagePopup.h" |
21 #include "third_party/WebKit/public/web/WebWidget.h" | 21 #include "third_party/WebKit/public/web/WebWidget.h" |
22 | 22 |
23 namespace test_runner { | 23 namespace test_runner { |
24 | 24 |
25 WebWidgetTestClient::WebWidgetTestClient( | 25 WebWidgetTestClient::WebWidgetTestClient( |
26 WebWidgetTestProxyBase* web_widget_test_proxy_base) | 26 WebWidgetTestProxyBase* web_widget_test_proxy_base) |
27 : web_widget_test_proxy_base_(web_widget_test_proxy_base), | 27 : web_widget_test_proxy_base_(web_widget_test_proxy_base), |
28 animation_scheduled_(false), | 28 animation_scheduled_(false), |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 blink::WebDragOperationsMask mask, | 95 blink::WebDragOperationsMask mask, |
96 const blink::WebImage& image, | 96 const blink::WebImage& image, |
97 const blink::WebPoint& point) { | 97 const blink::WebPoint& point) { |
98 test_runner()->setDragImage(image); | 98 test_runner()->setDragImage(image); |
99 | 99 |
100 // When running a test, we need to fake a drag drop operation otherwise | 100 // When running a test, we need to fake a drag drop operation otherwise |
101 // Windows waits for real mouse events to know when the drag is over. | 101 // Windows waits for real mouse events to know when the drag is over. |
102 web_widget_test_proxy_base_->event_sender()->DoDragDrop(data, mask); | 102 web_widget_test_proxy_base_->event_sender()->DoDragDrop(data, mask); |
103 } | 103 } |
104 | 104 |
105 | |
106 TestRunnerForSpecificView* WebWidgetTestClient::view_test_runner() { | 105 TestRunnerForSpecificView* WebWidgetTestClient::view_test_runner() { |
107 return web_widget_test_proxy_base_->web_view_test_proxy_base() | 106 return web_widget_test_proxy_base_->web_view_test_proxy_base() |
108 ->view_test_runner(); | 107 ->view_test_runner(); |
109 } | 108 } |
110 | 109 |
111 WebTestDelegate* WebWidgetTestClient::delegate() { | 110 WebTestDelegate* WebWidgetTestClient::delegate() { |
112 return web_widget_test_proxy_base_->web_view_test_proxy_base()->delegate(); | 111 return web_widget_test_proxy_base_->web_view_test_proxy_base()->delegate(); |
113 } | 112 } |
114 | 113 |
115 TestRunner* WebWidgetTestClient::test_runner() { | 114 TestRunner* WebWidgetTestClient::test_runner() { |
116 return web_widget_test_proxy_base_->web_view_test_proxy_base() | 115 return web_widget_test_proxy_base_->web_view_test_proxy_base() |
117 ->test_interfaces() | 116 ->test_interfaces() |
118 ->GetTestRunner(); | 117 ->GetTestRunner(); |
119 } | 118 } |
120 | 119 |
121 } // namespace test_runner | 120 } // namespace test_runner |
OLD | NEW |