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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/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/DeviceMotion/add-listener-from-callback.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/add-listener-from-callback.html b/third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/add-listener-from-callback.html
deleted file mode 100644
index 356a98d3a7cc8a3a26f5afc4998bda497f934430..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/add-listener-from-callback.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src="../../../resources/js-test.js"></script>
-<script>
-description('Tests that adding a new devicemotion event listener from a callback works as expected.');
-
-var mockAccelerationX = 1.1;
-var mockAccelerationY = 2.1;
-var mockAccelerationZ = 3.1;
-
-var mockAccelerationIncludingGravityX = 1.2;
-var mockAccelerationIncludingGravityY = 2.2;
-var mockAccelerationIncludingGravityZ = 3.2;
-
-var mockRotationRateAlpha = 1.3;
-var mockRotationRateBeta = 2.3;
-var mockRotationRateGamma = 3.3;
-
-var mockInterval = 100;
-
-if (window.testRunner) {
- testRunner.setMockDeviceMotion(true, mockAccelerationX, true, mockAccelerationY, true, mockAccelerationZ,
- true, mockAccelerationIncludingGravityX, true, mockAccelerationIncludingGravityY, true, mockAccelerationIncludingGravityZ,
- true, mockRotationRateAlpha, true, mockRotationRateBeta, true, mockRotationRateGamma,
- mockInterval);
- debug('TEST MODE enabled');
-} else
- debug('This test can not be run without the TestRunner');
-
-var deviceMotionEvent;
-function checkMotion(event) {
- deviceMotionEvent = event;
- shouldBe('deviceMotionEvent.acceleration.x', 'mockAccelerationX');
- shouldBe('deviceMotionEvent.acceleration.y', 'mockAccelerationY');
- shouldBe('deviceMotionEvent.acceleration.z', 'mockAccelerationZ');
-
- shouldBe('deviceMotionEvent.accelerationIncludingGravity.x', 'mockAccelerationIncludingGravityX');
- shouldBe('deviceMotionEvent.accelerationIncludingGravity.y', 'mockAccelerationIncludingGravityY');
- shouldBe('deviceMotionEvent.accelerationIncludingGravity.z', 'mockAccelerationIncludingGravityZ');
-
- shouldBe('deviceMotionEvent.rotationRate.alpha', 'mockRotationRateAlpha');
- shouldBe('deviceMotionEvent.rotationRate.beta', 'mockRotationRateBeta');
- shouldBe('deviceMotionEvent.rotationRate.gamma', 'mockRotationRateGamma');
-
- shouldBe('deviceMotionEvent.interval', 'mockInterval');
-}
-
-function listener(event) {
- checkMotion(event);
- finishJSTest();
-}
-
-window.addEventListener('devicemotion', listener);
-window.jsTestIsAsync = true;
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698