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

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

Issue 2744243006: Ensure complete end-to-end browsertest coverage for absolute device orientation. (Closed)
Patch Set: Michael's comment Created 3 years, 9 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>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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698