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> |