Index: components/test_runner/web_widget_test_client.cc |
diff --git a/components/test_runner/web_widget_test_client.cc b/components/test_runner/web_widget_test_client.cc |
index a3e65061f88931334c3a5ff8716a6efc77346caa..b0b4f1612054d90f2fe1ba4988e5e01214eefd25 100644 |
--- a/components/test_runner/web_widget_test_client.cc |
+++ b/components/test_runner/web_widget_test_client.cc |
@@ -15,6 +15,7 @@ |
#include "components/test_runner/web_task.h" |
#include "components/test_runner/web_test_delegate.h" |
#include "components/test_runner/web_view_test_proxy.h" |
+#include "components/test_runner/web_widget_test_proxy.h" |
#include "third_party/WebKit/public/platform/WebScreenInfo.h" |
#include "third_party/WebKit/public/web/WebPagePopup.h" |
#include "third_party/WebKit/public/web/WebWidget.h" |
@@ -23,13 +24,14 @@ namespace test_runner { |
WebWidgetTestClient::WebWidgetTestClient( |
TestRunner* test_runner, |
- WebViewTestProxyBase* web_view_test_proxy_base) |
+ WebWidgetTestProxyBase* web_widget_test_proxy_base) |
: test_runner_(test_runner), |
- web_view_test_proxy_base_(web_view_test_proxy_base), |
+ web_view_test_proxy_base_(nullptr), |
+ web_widget_test_proxy_base_(web_widget_test_proxy_base), |
animation_scheduled_(false), |
weak_factory_(this) { |
DCHECK(test_runner); |
- DCHECK(web_view_test_proxy_base); |
+ DCHECK(web_widget_test_proxy_base_); |
} |
WebWidgetTestClient::~WebWidgetTestClient() {} |
@@ -40,7 +42,8 @@ void WebWidgetTestClient::scheduleAnimation() { |
if (!animation_scheduled_) { |
animation_scheduled_ = true; |
- test_runner_->OnAnimationScheduled(web_view_test_proxy_base_->web_widget()); |
+ test_runner_->OnAnimationScheduled( |
+ web_widget_test_proxy_base_->web_widget()); |
web_view_test_proxy_base_->delegate()->PostDelayedTask( |
new WebCallbackTask(base::Bind(&WebWidgetTestClient::AnimateNow, |
@@ -51,7 +54,7 @@ void WebWidgetTestClient::scheduleAnimation() { |
void WebWidgetTestClient::AnimateNow() { |
if (animation_scheduled_) { |
- blink::WebWidget* web_widget = web_view_test_proxy_base_->web_widget(); |
+ blink::WebWidget* web_widget = web_widget_test_proxy_base_->web_widget(); |
animation_scheduled_ = false; |
test_runner_->OnAnimationBegun(web_widget); |
@@ -68,9 +71,7 @@ void WebWidgetTestClient::AnimateNow() { |
blink::WebScreenInfo WebWidgetTestClient::screenInfo() { |
blink::WebScreenInfo screen_info; |
MockScreenOrientationClient* mock_client = |
- web_view_test_proxy_base_->test_interfaces() |
- ->GetTestRunner() |
- ->getMockScreenOrientationClient(); |
+ test_runner_->getMockScreenOrientationClient(); |
if (mock_client->IsDisabled()) { |
// Indicate to WebViewTestProxy that there is no test/mock info. |
screen_info.orientationType = blink::WebScreenOrientationUndefined; |
@@ -102,8 +103,8 @@ void WebWidgetTestClient::setToolTipText(const blink::WebString& text, |
void WebWidgetTestClient::resetInputMethod() { |
// If a composition text exists, then we need to let the browser process |
// to cancel the input method's ongoing composition session. |
- if (web_view_test_proxy_base_) |
- web_view_test_proxy_base_->web_widget()->confirmComposition(); |
+ if (web_widget_test_proxy_base_) |
+ web_widget_test_proxy_base_->web_widget()->confirmComposition(); |
} |
} // namespace test_runner |