Add DeviceProximityController to support Device Proximity Events.
[WebKit-https.git] / LayoutTests / proximity / window-property.html
1 <html>
2 <head>
3 <script src="../fast/js/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 function hasDeviceProximityEventProperty()
10 {
11     for (var property in window) {
12         if (property == 'DeviceProximityEvent')
13             return true;
14     }
15     return false;
16 }
17
18 shouldBeTrue("typeof window.DeviceProximityEvent == 'object'");
19 shouldBeFalse("typeof window.DeviceProximityEvent == 'function'");
20 shouldBeTrue("hasDeviceProximityEventProperty()");
21 shouldBeTrue("'DeviceProximityEvent' in window");
22 shouldBeTrue("window.hasOwnProperty('DeviceProximityEvent')");
23
24 function hasOnDeviceProximityProperty()
25 {
26     for (var property in window) {
27         if (property == 'onwebkitdeviceproximity')
28             return true;
29     }
30     return false;
31 }
32
33 shouldBeTrue("typeof window.onwebkitdeviceproximity == 'object'");
34 shouldBeTrue("hasOnDeviceProximityProperty()");
35 shouldBeTrue("'onwebkitdeviceproximity' in window");
36 shouldBeTrue("window.hasOwnProperty('onwebkitdeviceproximity')");
37 </script>
38 <script src="../fast/js/resources/js-test-post.js"></script>
39 </body>
40 </html>