| 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 devicemotion events are not fired when the page
is not visible.'); | 7 description('Tests to check that devicemotion 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 devicemotion event"); | 12 testPassed("Received a devicemotion event"); |
| 13 finishJSTest(); | 13 finishJSTest(); |
| 14 } | 14 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 testRunner.setMockDeviceMotion(true, 0, true, 0, true, 0, | 49 testRunner.setMockDeviceMotion(true, 0, true, 0, true, 0, |
| 50 true, 0, true, 0, true, 0, | 50 true, 0, true, 0, true, 0, |
| 51 true, 0, true, 0, true, 0, | 51 true, 0, true, 0, true, 0, |
| 52 0); | 52 0); |
| 53 | 53 |
| 54 debug("* Page is visible"); | 54 debug("* Page is visible"); |
| 55 window.addEventListener('devicemotion', deviceMotionListener); | 55 window.addEventListener('devicemotion', deviceMotionListener); |
| 56 </script> | 56 </script> |
| 57 </body> | 57 </body> |
| 58 </html> | 58 </html> |
| OLD | NEW |