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

Side by Side Diff: third_party/WebKit/LayoutTests/ambient-light/create-event.html

Issue 2845763002: Remove DeviceLightEvent implementation (Closed)
Patch Set: same as previous patch Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/js-test.js"></script>
5 <script>
6 description("Tests the DeviceLightEvent constructor.");
7
8 var newEvent = new DeviceLightEvent("devicelight", {
9 bubbles: true, cancelable: false,
10 value: 10
11 });
12
13 var defaultEvent = new DeviceLightEvent("devicelight");
14
15 shouldBeTrue("typeof newEvent.type == 'string'");
16 shouldBeEqualToString("newEvent.type", "devicelight");
17 shouldBeTrue("typeof newEvent.bubbles == 'boolean'");
18 shouldBeTrue("newEvent.bubbles");
19 shouldBeTrue("typeof newEvent.cancelable == 'boolean'");
20 shouldBeFalse("newEvent.cancelable")
21 shouldBeTrue("typeof newEvent.value == 'number'");
22 shouldBeEqualToNumber('newEvent.value', 10);
23
24 // FIXME: Consider making bubbles property configurable.
25 shouldBeTrue("defaultEvent.bubbles");
26 shouldBeFalse("defaultEvent.cancelable");
27 shouldBe("defaultEvent.value", "Infinity");
28 </script>
29 </body>
30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698