Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: components/test_runner/web_test_proxy.cc

Issue 1807733002: Make MockScreenOrientationClient an internal detail of components/test_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-app-banner-dep
Patch Set: Rebasing... Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/test_runner/web_test_proxy.cc
diff --git a/components/test_runner/web_test_proxy.cc b/components/test_runner/web_test_proxy.cc
index 2db9db404915ba7294af2f13e4c9b7e383f282fd..0f181e584eaca7b7399dc1366d10aa363a1226ba 100644
--- a/components/test_runner/web_test_proxy.cc
+++ b/components/test_runner/web_test_proxy.cc
@@ -608,21 +608,17 @@ void WebTestProxyBase::LayoutAndPaintAsyncThen(const base::Closure& callback) {
void WebTestProxyBase::GetScreenOrientationForTesting(
blink::WebScreenInfo& screen_info) {
- if (!screen_orientation_client_ || screen_orientation_client_->IsDisabled())
+ MockScreenOrientationClient* mock_client = GetScreenOrientationClientMock();
+ if (mock_client->IsDisabled())
Łukasz Anforowicz 2016/03/16 00:16:01 This is a slightly different condition than before
return;
// Override screen orientation information with mock data.
- screen_info.orientationType =
- screen_orientation_client_->CurrentOrientationType();
- screen_info.orientationAngle =
- screen_orientation_client_->CurrentOrientationAngle();
+ screen_info.orientationType = mock_client->CurrentOrientationType();
+ screen_info.orientationAngle = mock_client->CurrentOrientationAngle();
}
MockScreenOrientationClient*
WebTestProxyBase::GetScreenOrientationClientMock() {
- if (!screen_orientation_client_.get()) {
- screen_orientation_client_.reset(new MockScreenOrientationClient);
- }
- return screen_orientation_client_.get();
+ return test_interfaces_->GetTestRunner()->getMockScreenOrientationClient();
}
MockWebSpeechRecognizer* WebTestProxyBase::GetSpeechRecognizerMock() {

Powered by Google App Engine
This is Rietveld 408576698