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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/page-visibility.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/page-visibility.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/page-visibility.html b/third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/page-visibility.html
deleted file mode 100644
index 152881024b1d4b3ed6e8048edeabe224dd42b8cc..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/DeviceMotion/page-visibility.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src="../../../resources/js-test.js"></script>
-<script>
-
-description('Tests to check that devicemotion events are not fired when the page is not visible.');
-window.jsTestIsAsync = true;
-
-function succeedAndFinish()
-{
- testPassed("Received a devicemotion event");
- finishJSTest();
-}
-
-function testWithPageVisible()
-{
- testPassed("Did not receive a devicemotion event");
- window.removeEventListener('devicemotion', failAndFinish);
- if (window.testRunner)
- testRunner.setPageVisibility("visible");
- debug("* Page is visible");
- window.addEventListener('devicemotion', succeedAndFinish);
-}
-
-function failAndFinish()
-{
- testFailed('Should not have received a devicemotion event while the page was hidden');
- finishJSTest();
-}
-
-function testWithPageHidden()
-{
- testPassed("Received a devicemotion event");
- window.removeEventListener('devicemotion', deviceMotionListener);
- if (window.testRunner)
- testRunner.setPageVisibility("hidden");
- debug("* Page is hidden");
- window.addEventListener('devicemotion', failAndFinish);
-
- setTimeout(testWithPageVisible, 100);
-}
-
-function deviceMotionListener(event) {
- setTimeout(testWithPageHidden, 0);
-}
-
-if (window.testRunner)
- testRunner.setMockDeviceMotion(true, 0, true, 0, true, 0,
- true, 0, true, 0, true, 0,
- true, 0, true, 0, true, 0,
- 0);
-
-debug("* Page is visible");
-window.addEventListener('devicemotion', deviceMotionListener);
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698