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

Unified Diff: third_party/WebKit/LayoutTests/ambient-light/page-visibility.html

Issue 2845763002: Remove DeviceLightEvent implementation (Closed)
Patch Set: same as previous patch Created 3 years, 8 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/ambient-light/page-visibility.html
diff --git a/third_party/WebKit/LayoutTests/ambient-light/page-visibility.html b/third_party/WebKit/LayoutTests/ambient-light/page-visibility.html
deleted file mode 100644
index 17373845b3f6f04a9dd82d6ff5252b411a9e6596..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/ambient-light/page-visibility.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src="../resources/js-test.js"></script>
-<script>
-
-description('Tests to check that devicelight events are not fired when the page is not visible.');
-window.jsTestIsAsync = true;
-
-function succeedAndFinish()
-{
- testPassed("Received a devicelight event");
- setTimeout(finishJSTest, 0);
-}
-
-function testWithPageVisible()
-{
- testPassed("Did not receive a devicelight event");
- window.removeEventListener('devicelight', failAndFinish);
- testRunner.setPageVisibility("visible");
- debug("* Page is visible");
- window.addEventListener('devicelight', succeedAndFinish);
-}
-
-function failAndFinish()
-{
- testFailed('Should not have received a devicelight event while the page was hidden');
- setTimeout(finishJSTest, 0);
-}
-
-function deviceLightListener(event)
-{
- testPassed("Received a devicelight event");
- window.removeEventListener('devicelight', deviceLightListener);
- testRunner.setPageVisibility("hidden");
- debug("* Page is hidden");
- window.addEventListener('devicelight', failAndFinish);
-
- setTimeout(testWithPageVisible, 0);
-}
-
-if (window.testRunner)
- testRunner.setMockDeviceLight(100);
-else
- debug('This test can not be run without the TestRunner');
-
-debug("* Page is visible");
-window.addEventListener('devicelight', deviceLightListener);
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698