Index: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html b/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html |
index 671e9aa7488bf3e8173f92a6919bd8ec7b2274d9..e92d451565587976ead13b98f2e8e26a03943626 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html |
+++ b/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html |
@@ -2,30 +2,10 @@ |
<html> |
<body> |
<script src="../../../resources/js-test.js"></script> |
+<script src="resources/basic-operation.js"></script> |
<script> |
-description('Tests the basic operation of DeviceOrientation using the mock.'); |
- |
-var mockAlpha = 1.1; |
-var mockBeta = 2.2; |
-var mockGamma = 3.3; |
-var mockAbsolute = true; |
- |
-if (window.testRunner) |
- testRunner.setMockDeviceOrientation(true, mockAlpha, true, mockBeta, true, mockGamma, true, mockAbsolute); |
-else |
- debug('This test can not be run without the TestRunner'); |
- |
-var deviceOrientationEvent; |
-window.addEventListener('deviceorientation', function(e) { |
- deviceOrientationEvent = e; |
- shouldBe('deviceOrientationEvent.alpha', 'mockAlpha'); |
- shouldBe('deviceOrientationEvent.beta', 'mockBeta'); |
- shouldBe('deviceOrientationEvent.gamma', 'mockGamma'); |
- shouldBe('deviceOrientationEvent.absolute', 'mockAbsolute'); |
- finishJSTest(); |
-}); |
- |
-window.jsTestIsAsync = true; |
+description('Tests basic operation of the deviceorientation event using mock data.'); |
+testBasicOperation('deviceorientation'); |
</script> |
</body> |
</html> |