diff options
Diffstat (limited to 'tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java')
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java index 8c7254c4c15b..db076daaa1a1 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java @@ -150,6 +150,9 @@ public class TestShellActivity extends Activity implements LayoutTestController if (intent != null) { executeIntent(intent); } + + // This is asynchronous, but it gets processed by WebCore before it starts loading pages. + mWebView.useMockDeviceOrientation(); } @Override @@ -494,6 +497,12 @@ public class TestShellActivity extends Activity implements LayoutTestController mGeolocationPermission = allow; } + public void setMockDeviceOrientation(boolean canProvideAlpha, double alpha, + boolean canProvideBeta, double beta, boolean canProvideGamma, double gamma) { + mWebView.setMockDeviceOrientation(canProvideAlpha, alpha, canProvideBeta, beta, + canProvideGamma, gamma); + } + public void overridePreference(String key, boolean value) { // TODO: We should look up the correct WebView for the frame which // called the layoutTestController method. Currently, we just use the |