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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback.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/add-listener-from-callback.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback.html b/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback.html
deleted file mode 100644
index 41f834f7dfeda8b7277b525d3b89556441447cc4..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/DeviceOrientation/add-listener-from-callback.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src="../../../resources/js-test.js"></script>
-<script>
-description('Tests that adding a new event listener from a callback works as expected.');
-
-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, mockAbsolute);
-else
- debug('This test can not be run without the TestRunner');
-
-var deviceOrientationEvent;
-function checkOrientation(event) {
- deviceOrientationEvent = event;
- shouldBe('deviceOrientationEvent.alpha', 'mockAlpha');
- shouldBe('deviceOrientationEvent.beta', 'mockBeta');
- shouldBe('deviceOrientationEvent.gamma', 'mockGamma');
- shouldBe('deviceOrientationEvent.absolute', 'mockAbsolute');
-}
-
-var firstListenerEvents = 0;
-function firstListener(event) {
- checkOrientation(event);
- window.removeEventListener('deviceorientation', firstListener);
- if (++firstListenerEvents == 1)
- window.addEventListener('deviceorientation', secondListener);
-}
-
-var secondListenerEvents = 0;
-function secondListener(event) {
- checkOrientation(event);
- ++secondListenerEvents;
- if (firstListenerEvents != 1 || secondListenerEvents != 1)
- testFailed('Too many events fired for first or second listener');
- finishJSTest();
-}
-
-window.addEventListener('deviceorientation', firstListener);
-
-window.jsTestIsAsync = true;
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698