Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / DeviceOrientation / window-property.html
blob1338a196c910d52df01e44291e8884a746002481
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../../resources/js-test.js"></script>
5 <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')
18 return true;
20 return false;
23 shouldBeTrue("typeof window.ondeviceorientation == 'object'");
24 shouldBeTrue("hasOnDeviceOrientationProperty()");
25 shouldBeTrue("'ondeviceorientation' in window");
26 shouldBeTrue("window.hasOwnProperty('ondeviceorientation')");
27 </script>
28 </body>
29 </html>