Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: LayoutTests/fast/dom/DeviceLight/script-tests/window-property.js

Issue 143823004: Implement DeviceLight (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase after r169270 Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..65194dd3213dedbd259e2d63397b1637a10bf057
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceLight/script-tests/window-property.js
@@ -0,0 +1,16 @@
+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')");

Powered by Google App Engine
This is Rietveld 408576698