| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| description('Tests that the window.DeviceProximityEvent and window.onwebkitdeviceproximity properties are present.'); |
| |
| shouldBeTrue("typeof window.DeviceProximityEvent == 'object'"); |
| shouldBeFalse("typeof window.DeviceProximityEvent == 'function'"); |
| shouldBeFalse("window.propertyIsEnumerable('DeviceProximityEvent')"); |
| shouldBeTrue("'DeviceProximityEvent' in window"); |
| shouldBeTrue("window.hasOwnProperty('DeviceProximityEvent')"); |
| |
| function hasOnDeviceProximityProperty() |
| { |
| for (var property in window) { |
| if (property == 'onwebkitdeviceproximity') |
| return true; |
| } |
| return false; |
| } |
| |
| shouldBeTrue("typeof window.onwebkitdeviceproximity == 'object'"); |
| shouldBeTrue("hasOnDeviceProximityProperty()"); |
| shouldBeTrue("'onwebkitdeviceproximity' in window"); |
| shouldBeTrue("window.hasOwnProperty('onwebkitdeviceproximity')"); |
| </script> |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |