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

Unified Diff: LayoutTests/fast/dom/DeviceLight/script-tests/create-event.js

Issue 143823004: Implement DeviceLight (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Work in Adam's comments Created 6 years, 10 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/create-event.js
diff --git a/LayoutTests/fast/dom/DeviceLight/script-tests/create-event.js b/LayoutTests/fast/dom/DeviceLight/script-tests/create-event.js
new file mode 100644
index 0000000000000000000000000000000000000000..2b1d7a40bd253ba18f0bbc639a2780fab903081d
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceLight/script-tests/create-event.js
@@ -0,0 +1,15 @@
+description("Tests that document.createEvent() works with DeviceLightEvent.");
+
+var event = document.createEvent('DeviceLightEvent');
+
+shouldBeTrue("typeof event == 'object'");
+
+shouldBeTrue("'type' in event");
+shouldBeTrue("'bubbles' in event");
+shouldBeTrue("'cancelable' in event");
+shouldBeTrue("'value' in event");
+
+shouldBeTrue("typeof event.type == 'string'");
+shouldBeTrue("typeof event.bubbles == 'boolean'");
+shouldBeTrue("typeof event.cancelable == 'boolean'");
+shouldBeTrue("typeof event.value == 'number'");

Powered by Google App Engine
This is Rietveld 408576698