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

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

Issue 2672663002: Move DeviceLight out from fast/dom/. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 <script> 5 <script>
6 6
7 description('Tests to check that devicelight events are not fired when the page is not visible.'); 7 description('Tests to check that devicelight events are not fired when the page is not visible.');
8 window.jsTestIsAsync = true; 8 window.jsTestIsAsync = true;
9 9
10 function succeedAndFinish() 10 function succeedAndFinish()
11 { 11 {
12 testPassed("Received a devicelight event"); 12 testPassed("Received a devicelight event");
13 setTimeout(finishJSTest, 0); 13 setTimeout(finishJSTest, 0);
14 } 14 }
(...skipping 27 matching lines...) Expand all
42 if (window.testRunner) 42 if (window.testRunner)
43 testRunner.setMockDeviceLight(100); 43 testRunner.setMockDeviceLight(100);
44 else 44 else
45 debug('This test can not be run without the TestRunner'); 45 debug('This test can not be run without the TestRunner');
46 46
47 debug("* Page is visible"); 47 debug("* Page is visible");
48 window.addEventListener('devicelight', deviceLightListener); 48 window.addEventListener('devicelight', deviceLightListener);
49 </script> 49 </script>
50 </body> 50 </body>
51 </html> 51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698