Change LayoutTests' m*-p* files to use pre and post js files in LayoutTests/resources.
[WebKit-https.git] / LayoutTests / proximity / window-property.html
1 <html>
2 <head>
3 <script src="../resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <script>
7 description('Tests that the window.DeviceProximityEvent and window.onwebkitdeviceproximity properties are present.');
8
9 shouldBeTrue("typeof window.DeviceProximityEvent == 'object'");
10 shouldBeFalse("typeof window.DeviceProximityEvent == 'function'");
11 shouldBeFalse("window.propertyIsEnumerable('DeviceProximityEvent')");
12 shouldBeTrue("'DeviceProximityEvent' in window");
13 shouldBeTrue("window.hasOwnProperty('DeviceProximityEvent')");
14
15 function hasOnDeviceProximityProperty()
16 {
17     for (var property in window) {
18         if (property == 'onwebkitdeviceproximity')
19             return true;
20     }
21     return false;
22 }
23
24 shouldBeTrue("typeof window.onwebkitdeviceproximity == 'object'");
25 shouldBeTrue("hasOnDeviceProximityProperty()");
26 shouldBeTrue("'onwebkitdeviceproximity' in window");
27 shouldBeTrue("window.hasOwnProperty('onwebkitdeviceproximity')");
28 </script>
29 <script src="../resources/js-test-post.js"></script>
30 </body>
31 </html>