OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <title>DeviceOrientationAbsolute all-null event test</title> |
| 4 </head> |
| 5 <body> |
| 6 <div id="status">FAIL</div> |
| 7 </body> |
| 8 <script type="text/javascript"> |
| 9 function checkOrientationAbsoluteEvent(event) { |
| 10 return event.alpha == null && |
| 11 event.beta == null && |
| 12 event.gamma == null; |
| 13 } |
| 14 |
| 15 function onOrientationAbsolute(event) { |
| 16 window.removeEventListener('deviceorientationabsolute', onOrientationAbsol
ute); |
| 17 checkOrientationAbsoluteEvent(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('deviceorientationabsolute', onOrientationAbsolute); |
| 30 </script> |
| 31 </html> |
OLD | NEW |