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); |