[refactor] More post-NSS WebCrypto cleanups (utility functions).
[chromium-blink-merge.git] / content / test / data / device_sensors / device_orientation_null_test.html
blob07645bd73aed1ecb893c222e1bbdecdb14b9100e
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;
15 function onOrientation(event) {
16 window.removeEventListener('deviceorientation', onOrientation);
17 checkOrientationEvent(event) ? pass() : fail();
20 function pass() {
21 document.getElementById('status').innerHTML = 'PASS';
22 document.location = '#pass';
25 function fail() {
26 document.location = '#fail';
29 window.addEventListener('deviceorientation', onOrientation);
30 </script>
31 </html>