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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/basic-operation.html

Issue 1416123002: Absolute Device Orientation API: blink implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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
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>

Powered by Google App Engine
This is Rietveld 408576698