Index: LayoutTests/fast/dom/DeviceLight/window-property.html |
diff --git a/LayoutTests/fast/dom/DeviceLight/window-property.html b/LayoutTests/fast/dom/DeviceLight/window-property.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b9ed30d06441be3e578e72a5c37702adeaa1dcfe |
--- /dev/null |
+++ b/LayoutTests/fast/dom/DeviceLight/window-property.html |
@@ -0,0 +1,39 @@ |
+<html> |
+<head> |
+<script src="../../../resources/js-test.js"></script> |
+</head> |
+<body> |
+<script> |
+description("Tests that the window.DeviceLightEvent and window.ondevicelight properties are present."); |
+ |
+function hasDeviceLightEventProperty() |
+{ |
+ for (var property in window) { |
+ if (property == "DeviceLightEvent") |
+ return true; |
+ } |
+ return false; |
+} |
+ |
+shouldBeTrue("typeof window.DeviceLightEvent == 'object'"); |
+shouldBeFalse("typeof window.DeviceLightEvent == 'function'"); |
+shouldBeTrue("hasDeviceLightEventProperty()"); |
+shouldBeTrue("'DeviceLightEvent' in window"); |
+shouldBeTrue("window.hasOwnProperty('DeviceLightEvent')"); |
+ |
+function hasOnDeviceLightProperty() |
+{ |
+ for (var property in window) { |
+ if (property == "ondevicelight") |
+ return true; |
+ } |
+} |
+ |
+shouldBeTrue("typeof window.ondevicelight == 'object'"); |
+shouldBeTrue("hasOnDeviceLightProperty()"); |
+shouldBeTrue("'ondevicelight' in window"); |
+shouldBeTrue("window.hasOwnProperty('ondevicelight')"); |
+ |
+</script> |
+</body> |
+</html> |