OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../js/resources/js-test-pre.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <script> | 6 <script> |
7 | 7 |
8 description('Tests to check that deviceorientation events are not fired when the
page is not visible.'); | 8 description('Tests to check that deviceorientation events are not fired when the
page is not visible.'); |
9 window.jsTestIsAsync = true; | 9 window.jsTestIsAsync = true; |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 function deviceOrientationListener(event) { | 45 function deviceOrientationListener(event) { |
46 setTimeout(testWithPageHidden, 0); | 46 setTimeout(testWithPageHidden, 0); |
47 } | 47 } |
48 | 48 |
49 if (window.testRunner) | 49 if (window.testRunner) |
50 testRunner.setMockDeviceOrientation(true, 1, true, 2, true, 3, true, true); | 50 testRunner.setMockDeviceOrientation(true, 1, true, 2, true, 3, true, true); |
51 | 51 |
52 debug("* Page is visible"); | 52 debug("* Page is visible"); |
53 window.addEventListener('deviceorientation', deviceOrientationListener); | 53 window.addEventListener('deviceorientation', deviceOrientationListener); |
54 </script> | 54 </script> |
55 <script src="../../js/resources/js-test-post.js"></script> | |
56 </body> | 55 </body> |
57 </html> | 56 </html> |
OLD | NEW |