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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/DeviceLight/create-event.html

Issue 2216593002: Drop document.createEvent support for things still behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@createEvent
Patch Set: fix LayoutTests Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/DeviceLight/create-event-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 description("Tests that document.createEvent() works with DeviceLightEvent."); 6 description("Tests the DeviceLightEvent constructor.");
7 7
8 var event = document.createEvent('DeviceLightEvent');
9 var newEvent = new DeviceLightEvent("devicelight", { 8 var newEvent = new DeviceLightEvent("devicelight", {
10 bubbles: true, cancelable: false, 9 bubbles: true, cancelable: false,
11 value: 10 10 value: 10
12 }); 11 });
13 12
14 var defaultEvent = new DeviceLightEvent("devicelight"); 13 var defaultEvent = new DeviceLightEvent("devicelight");
15 14
16 shouldBeTrue("typeof event == 'object'");
17 shouldBe("event.__proto__", "DeviceLightEvent.prototype");
18
19 shouldBeTrue("event instanceof window.DeviceLightEvent");
20 shouldBeTrue("'type' in event");
21 shouldBeTrue("'bubbles' in event");
22 shouldBeTrue("'cancelable' in event");
23 shouldBeTrue("'value' in event");
24
25 shouldBeTrue("typeof newEvent.type == 'string'"); 15 shouldBeTrue("typeof newEvent.type == 'string'");
26 shouldBeEqualToString("newEvent.type", "devicelight"); 16 shouldBeEqualToString("newEvent.type", "devicelight");
27 shouldBeTrue("typeof newEvent.bubbles == 'boolean'"); 17 shouldBeTrue("typeof newEvent.bubbles == 'boolean'");
28 shouldBeTrue("newEvent.bubbles"); 18 shouldBeTrue("newEvent.bubbles");
29 shouldBeTrue("typeof newEvent.cancelable == 'boolean'"); 19 shouldBeTrue("typeof newEvent.cancelable == 'boolean'");
30 shouldBeFalse("newEvent.cancelable") 20 shouldBeFalse("newEvent.cancelable")
31 shouldBeTrue("typeof newEvent.value == 'number'"); 21 shouldBeTrue("typeof newEvent.value == 'number'");
32 shouldBeEqualToNumber('newEvent.value', 10); 22 shouldBeEqualToNumber('newEvent.value', 10);
33 23
34 // FIXME: Consider making bubbles property configurable. 24 // FIXME: Consider making bubbles property configurable.
35 shouldBeTrue("defaultEvent.bubbles"); 25 shouldBeTrue("defaultEvent.bubbles");
36 shouldBeFalse("defaultEvent.cancelable"); 26 shouldBeFalse("defaultEvent.cancelable");
27 shouldBe("defaultEvent.value", "Infinity");
37 </script> 28 </script>
38 </body> 29 </body>
39 </html> 30 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/DeviceLight/create-event-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698