Index: LayoutTests/fast/dom/DeviceLight/script-tests/window-property.js |
diff --git a/LayoutTests/fast/dom/DeviceLight/script-tests/window-property.js b/LayoutTests/fast/dom/DeviceLight/script-tests/window-property.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..034c0c3c2f4432268c88effb97ed8f1dfdbbcbe4 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/DeviceLight/script-tests/window-property.js |
@@ -0,0 +1,30 @@ |
+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; |
+ } |
+ return false; |
+} |
+ |
+shouldBeTrue("typeof window.ondevicelight == 'object'"); |
+shouldBeTrue("hasOnDeviceLightProperty()"); |
+shouldBeTrue("'ondevicelight' in window"); |
+shouldBeTrue("window.hasOwnProperty('ondevicelight')"); |