diff options
author | Steve Block <steveblock@google.com> | 2010-08-04 10:28:46 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-08-10 12:00:35 +0100 |
commit | 68dede3d6664d91302d727531d13f7f5862d3a50 (patch) | |
tree | 9f3b0130483eec30aa9bb9713cdd056047cf9702 /tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java | |
parent | 8aff3c0571f078b0b212bd283278791ebc478da5 (diff) |
Hook up mock for testing DeviceOrientation in DRT
Change-Id: I99fbe328807428aa0d94893545bad0697ccb71d7
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 |