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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/updates.html

Issue 2677603003: Move DeviceMotion and DeviceOrientation out from fast/dom/. (Closed)
Patch Set: device_orientation Created 3 years, 10 months 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/updates.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/updates.html b/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/updates.html
deleted file mode 100644
index c7b600f3ed707d678d32ff38ca64af48ab82f998..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/updates.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src="../../../resources/js-test.js"></script>
-<script>
-description('Tests that updates to the orientation causes new events to fire.');
-
-var mockEvent;
-function setMockOrientation(alpha, beta, gamma, absolute) {
- mockEvent = {alpha: alpha, beta: beta, gamma: gamma, absolute: absolute};
- if (window.testRunner)
- testRunner.setMockDeviceOrientation(true, mockEvent.alpha, true, mockEvent.beta, true, mockEvent.gamma, mockEvent.absolute);
- else
- debug('This test can not be run without the TestRunner');
-}
-
-var deviceOrientationEvent;
-function checkOrientation(event) {
- deviceOrientationEvent = event;
- shouldBe('deviceOrientationEvent.alpha', 'mockEvent.alpha');
- shouldBe('deviceOrientationEvent.beta', 'mockEvent.beta');
- shouldBe('deviceOrientationEvent.gamma', 'mockEvent.gamma');
- shouldBe('deviceOrientationEvent.absolute', 'mockEvent.absolute');
-}
-
-function firstListener(event) {
- checkOrientation(event);
- window.removeEventListener('deviceorientation', firstListener);
- setTimeout(function(){initUpdateListener();}, 0);
-}
-
-function initUpdateListener() {
- setMockOrientation(11.1, 22.2, 33.3, true);
- window.addEventListener('deviceorientation', updateListener);
-}
-
-function updateListener(event) {
- checkOrientation(event);
- finishJSTest();
-}
-
-setMockOrientation(1.1, 2.2, 3.3, true);
-window.addEventListener('deviceorientation', firstListener);
-
-window.jsTestIsAsync = true;
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698