t010-manual.https.html (991B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Rotate the device frame around its y axis</title> 5 <meta name=viewport content="width=device-width, maximum-scale=1.0"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <link rel="author" title="Mosquito FP7"> 9 <link rel="reviewer author" title="Zhiqiang Zhang" href="mailto:zhiqiang.zhang@intel.com"> <!-- 2013-10-12 --> 10 </head> 11 <body> 12 <p>Rotate the device frame around its y axis to run the test.</p> 13 <div id="log"></div> 14 <script> 15 var t1 = async_test("Gamma is in [-90, 90)"); 16 var run = false; 17 window.addEventListener("deviceorientation", function(e) { 18 if (!run && e.gamma !== null) { 19 run = true; 20 t1.step(function() { 21 assert_greater_than_equal(e.gamma, -90); 22 assert_less_than(e.gamma, 90); 23 }); 24 t1.done(); 25 } 26 }, false); 27 </script> 28 </body> 29 </html>