4 <script src=
"../../../resources/js-test.js"></script>
6 description('Tests that the window.DeviceOrientationEvent and window.ondeviceorientation properties are present.');
8 shouldBeTrue("typeof window.DeviceOrientationEvent == 'object'");
9 shouldBeFalse("typeof window.DeviceOrientationEvent == 'function'");
10 shouldBeFalse("window.propertyIsEnumerable('DeviceOrientationEvent')");
11 shouldBeTrue("'DeviceOrientationEvent' in window");
12 shouldBeTrue("window.hasOwnProperty('DeviceOrientationEvent')");
14 function hasOnDeviceOrientationProperty()
16 for (var property
in window
) {
17 if (property
== 'ondeviceorientation')
23 shouldBeTrue("typeof window.ondeviceorientation == 'object'");
24 shouldBeTrue("hasOnDeviceOrientationProperty()");
25 shouldBeTrue("'ondeviceorientation' in window");
26 shouldBeTrue("window.hasOwnProperty('ondeviceorientation')");