| 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 description("Tests that the window.DeviceMotionEvent and window.ondevicemotion p
roperties are present."); | 6 description("Tests that the window.DeviceMotionEvent and window.ondevicemotion p
roperties are present."); |
| 7 | 7 |
| 8 function hasDeviceMotionEventProperty() | 8 function hasDeviceMotionEventProperty() |
| 9 { | 9 { |
| 10 for (var property in window) { | 10 for (var property in window) { |
| 11 if (property == "DeviceMotionEvent") | 11 if (property == "DeviceMotionEvent") |
| 12 return true; | 12 return true; |
| 13 } | 13 } |
| 14 return false; | 14 return false; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 29 return false; | 29 return false; |
| 30 } | 30 } |
| 31 | 31 |
| 32 shouldBeTrue("typeof window.ondevicemotion == 'object'"); | 32 shouldBeTrue("typeof window.ondevicemotion == 'object'"); |
| 33 shouldBeTrue("hasOnDeviceMotionProperty()"); | 33 shouldBeTrue("hasOnDeviceMotionProperty()"); |
| 34 shouldBeTrue("'ondevicemotion' in window"); | 34 shouldBeTrue("'ondevicemotion' in window"); |
| 35 shouldBeTrue("window.hasOwnProperty('ondevicemotion')"); | 35 shouldBeTrue("window.hasOwnProperty('ondevicemotion')"); |
| 36 </script> | 36 </script> |
| 37 </body> | 37 </body> |
| 38 </html> | 38 </html> |
| OLD | NEW |