4 <script src=
"../../../resources/js-test.js"></script>
6 description('Tests the basic operation of DeviceOrientation using the mock.');
11 var mockAbsolute
= true;
13 if (window
.testRunner
)
14 testRunner
.setMockDeviceOrientation(true, mockAlpha
, true, mockBeta
, true, mockGamma
, true, mockAbsolute
);
16 debug('This test can not be run without the TestRunner');
18 var deviceOrientationEvent
;
19 window
.addEventListener('deviceorientation', function(e
) {
20 deviceOrientationEvent
= e
;
21 shouldBe('deviceOrientationEvent.alpha', 'mockAlpha');
22 shouldBe('deviceOrientationEvent.beta', 'mockBeta');
23 shouldBe('deviceOrientationEvent.gamma', 'mockGamma');
24 shouldBe('deviceOrientationEvent.absolute', 'mockAbsolute');
28 window
.jsTestIsAsync
= true;