| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test_interfaces.h" | 5 #include "components/test_runner/test_interfaces.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 void TestInterfaces::SetDelegate(WebTestDelegate* delegate) { | 54 void TestInterfaces::SetDelegate(WebTestDelegate* delegate) { |
| 55 gamepad_controller_ = GamepadController::Create(delegate); | 55 gamepad_controller_ = GamepadController::Create(delegate); |
| 56 test_runner_->SetDelegate(delegate); | 56 test_runner_->SetDelegate(delegate); |
| 57 delegate_ = delegate; | 57 delegate_ = delegate; |
| 58 } | 58 } |
| 59 | 59 |
| 60 void TestInterfaces::BindTo(blink::WebFrame* frame) { | 60 void TestInterfaces::BindTo(blink::WebFrame* frame) { |
| 61 if (gamepad_controller_) | 61 if (gamepad_controller_) |
| 62 gamepad_controller_->Install(frame); | 62 gamepad_controller_->Install(frame); |
| 63 test_runner_->Install(frame); | |
| 64 GCController::Install(frame); | 63 GCController::Install(frame); |
| 65 } | 64 } |
| 66 | 65 |
| 67 void TestInterfaces::ResetTestHelperControllers() { | 66 void TestInterfaces::ResetTestHelperControllers() { |
| 68 if (gamepad_controller_) | 67 if (gamepad_controller_) |
| 69 gamepad_controller_->Reset(); | 68 gamepad_controller_->Reset(); |
| 70 blink::WebCache::clear(); | 69 blink::WebCache::clear(); |
| 71 | 70 |
| 72 for (WebTestProxyBase* web_test_proxy_base : window_list_) | 71 for (WebTestProxyBase* web_test_proxy_base : window_list_) |
| 73 web_test_proxy_base->Reset(); | 72 web_test_proxy_base->Reset(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 if (!theme_engine_.get()) | 149 if (!theme_engine_.get()) |
| 151 theme_engine_.reset(new MockWebThemeEngine()); | 150 theme_engine_.reset(new MockWebThemeEngine()); |
| 152 return theme_engine_.get(); | 151 return theme_engine_.get(); |
| 153 } | 152 } |
| 154 | 153 |
| 155 AppBannerClient* TestInterfaces::GetAppBannerClient() { | 154 AppBannerClient* TestInterfaces::GetAppBannerClient() { |
| 156 return app_banner_client_; | 155 return app_banner_client_; |
| 157 } | 156 } |
| 158 | 157 |
| 159 } // namespace test_runner | 158 } // namespace test_runner |
| OLD | NEW |