1 This tests the constructors for all the event DOM classes that have them.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS (new Event('eventType')).bubbles is false
7 PASS (new Event('eventType')).cancelable is false
8 PASS (new Event('eventType', { bubbles: true, cancelable: true })).bubbles is true
9 PASS (new Event('eventType', { bubbles: true, cancelable: true })).cancelable is true
10 PASS (new Event('eventType', { bubbles: true, cancelable: false })).bubbles is true
11 PASS (new Event('eventType', { bubbles: true, cancelable: false })).cancelable is false
12 PASS (new Event('eventType', { bubbles: true, cancelable: undefined })).bubbles is true
13 PASS (new Event('eventType', { bubbles: true, cancelable: undefined })).cancelable is false
14 PASS (new Event('eventType', { bubbles: true, cancelable: 0 })).bubbles is true
15 PASS (new Event('eventType', { bubbles: true, cancelable: 0 })).cancelable is false
16 PASS (new Event('eventType', { bubbles: true })).bubbles is true
17 PASS (new Event('eventType', { bubbles: true })).cancelable is false
18 PASS (new Event('eventType', { })).bubbles is false
19 PASS (new Event('eventType', { })).cancelable is false
20 PASS (new Event('eventType', null)).bubbles is false
21 PASS (new Event('eventType', null)).cancelable is false
22 PASS (new Event('eventType', undefined)).bubbles is false
23 PASS (new Event('eventType', undefined)).cancelable is false
24 PASS new Event('eventType', 0) threw exception TypeError: Failed to construct 'Event': parameter 2 ('eventInitDict') is not an object..
25 PASS (new Event('eventType', window)).bubbles is false
26 PASS (new Event('eventType', window)).cancelable is false
27 PASS (new Event('eventType', window)).bubbles is true
28 PASS (new Event('eventType', window)).cancelable is false
29 PASS (new Event('eventType', document)).bubbles is true
30 PASS (new Event('eventType', document)).cancelable is false
31 PASS (new Event('eventType', constructible)).bubbles is true
32 PASS (new Event('eventType', constructible)).cancelable is false
33 PASS (new Event('eventType', { bubbles: true, cancelable: true, other: true })).bubbles is true
34 PASS (new Event('eventType', { bubbles: true, cancelable: true, other: true })).cancelable is true
35 PASS (new Event('eventType', { bubbles: true, get cancelable() { return true; } })).bubbles is true
36 PASS (new Event('eventType', { bubbles: true, get cancelable() { return true; } })).cancelable is true
37 PASS (new Event('eventType', { bubbles: true, get cancelable() { return false; } })).bubbles is true
38 PASS (new Event('eventType', { bubbles: true, get cancelable() { return false; } })).cancelable is false
39 PASS new Event('eventType', { bubbles: true, get cancelable() { throw 'Custom Error'; } }) threw exception Custom Error.
40 PASS successfullyParsed is true