| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |