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

Unified Diff: content/shell/renderer/test_runner/web_test_proxy.cc

Issue 339913002: Move MockScreenOrientationController to content/shell/renderer/test_runner/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix layer violation Created 6 years, 6 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
« no previous file with comments | « content/shell/renderer/test_runner/web_test_proxy.h ('k') | content/shell/renderer/webkit_test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/web_test_proxy.cc
diff --git a/content/shell/renderer/test_runner/web_test_proxy.cc b/content/shell/renderer/test_runner/web_test_proxy.cc
index 4bef535b90ed6629536b49d8edcd7801e0e0b431..0342bdd637a5d5e851793659cbe715e8d55a3099 100644
--- a/content/shell/renderer/test_runner/web_test_proxy.cc
+++ b/content/shell/renderer/test_runner/web_test_proxy.cc
@@ -19,6 +19,7 @@
#include "content/shell/renderer/test_runner/WebTestInterfaces.h"
#include "content/shell/renderer/test_runner/accessibility_controller.h"
#include "content/shell/renderer/test_runner/event_sender.h"
+#include "content/shell/renderer/test_runner/mock_screen_orientation_client.h"
#include "content/shell/renderer/test_runner/mock_web_push_client.h"
#include "content/shell/renderer/test_runner/mock_web_user_media_client.h"
#include "content/shell/renderer/test_runner/test_runner.h"
@@ -528,6 +529,25 @@ void WebTestProxyBase::DisplayAsyncThen(const base::Closure& callback) {
&WebTestProxyBase::DidDisplayAsync, base::Unretained(this), callback));
}
+void WebTestProxyBase::GetScreenOrientationForTesting(
+ blink::WebScreenInfo& screen_info) {
+ if (!screen_orientation_client_)
+ return;
+ // Override screen orientation information with mock data.
+ screen_info.orientationType =
+ screen_orientation_client_->CurrentOrientationType();
+ screen_info.orientationAngle =
+ screen_orientation_client_->CurrentOrientationAngle();
+}
+
+MockScreenOrientationClient*
+WebTestProxyBase::GetScreenOrientationClientMock() {
+ if (!screen_orientation_client_.get()) {
+ screen_orientation_client_.reset(new MockScreenOrientationClient);
+ }
+ return screen_orientation_client_.get();
+}
+
blink::WebMIDIClientMock* WebTestProxyBase::GetMIDIClientMock() {
if (!midi_client_.get())
midi_client_.reset(new blink::WebMIDIClientMock);
« no previous file with comments | « content/shell/renderer/test_runner/web_test_proxy.h ('k') | content/shell/renderer/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698