| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <title>DeviceOrientation all-null event test</title> | |
| 4 </head> | |
| 5 <body> | |
| 6 <div id="status">FAIL</div> | |
| 7 </body> | |
| 8 <script type="text/javascript"> | |
| 9 function checkOrientationEvent(event) { | |
| 10 return event.alpha == null && | |
| 11 event.beta == null && | |
| 12 event.gamma == null; | |
| 13 } | |
| 14 | |
| 15 function onOrientation(event) { | |
| 16 window.removeEventListener('deviceorientation', onOrientation); | |
| 17 checkOrientationEvent(event) ? pass() : fail(); | |
| 18 } | |
| 19 | |
| 20 function pass() { | |
| 21 document.getElementById('status').innerHTML = 'PASS'; | |
| 22 document.location = '#pass'; | |
| 23 } | |
| 24 | |
| 25 function fail() { | |
| 26 document.location = '#fail'; | |
| 27 } | |
| 28 | |
| 29 window.addEventListener('deviceorientation', onOrientation); | |
| 30 </script> | |
| 31 </html> | |
| OLD | NEW |