Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Side by Side Diff: content/test/data/device_sensors/device_orientation_null_test.html

Issue 870103004: Deflake Device Orientation/Motion browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix formatting Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698