1 This tests the constructor for the CompositionEvent DOM class.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS new CompositionEvent('eventType').bubbles is false
7 PASS new CompositionEvent('eventType').cancelable is false
8 PASS new CompositionEvent('eventType').view is null
9 PASS new CompositionEvent('eventType').detail is 0
10 PASS new CompositionEvent('eventType').data is ""
11 PASS new CompositionEvent('eventType', { bubbles: false }).bubbles is false
12 PASS new CompositionEvent('eventType', { bubbles: true }).bubbles is true
13 PASS new CompositionEvent('eventType', { cancelable: false }).cancelable is false
14 PASS new CompositionEvent('eventType', { cancelable: true }).cancelable is true
15 PASS new CompositionEvent('eventType', { view: window }).view is window
16 PASS new CompositionEvent('eventType', { view: this }).view is this
17 PASS new CompositionEvent('eventType', { view: testObject }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
18 PASS new CompositionEvent('eventType', { view: document }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
19 PASS new CompositionEvent('eventType', { view: undefined }).view is null
20 PASS new CompositionEvent('eventType', { view: null }).view is null
21 PASS new CompositionEvent('eventType', { view: false }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
22 PASS new CompositionEvent('eventType', { view: true }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
23 PASS new CompositionEvent('eventType', { view: '' }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
24 PASS new CompositionEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
25 PASS new CompositionEvent('eventType', { view: 12345 }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
26 PASS new CompositionEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
27 PASS new CompositionEvent('eventType', { view: NaN }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
28 PASS new CompositionEvent('eventType', { view: {valueOf: function () { return window; } } }).view == window threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
29 PASS new CompositionEvent('eventType', { get view() { return window; } }).view is window
30 PASS new CompositionEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Failed to construct 'CompositionEvent': member view is not of type Window..
31 PASS new CompositionEvent('eventType', { get view() { throw 'CompositionEvent Error'; } }) threw exception CompositionEvent Error.
32 PASS new CompositionEvent('eventType', { data: 'koakuma' }).data is "koakuma"
33 PASS new CompositionEvent('eventType', { data: '' }).data is ""
34 PASS new CompositionEvent('eventType', { data: undefined }).data is ""
35 PASS new CompositionEvent('eventType', { data: null }).data is "null"
36 PASS new CompositionEvent('eventType', { data: false }).data is "false"
37 PASS new CompositionEvent('eventType', { data: true }).data is "true"
38 PASS new CompositionEvent('eventType', { data: 12345 }).data is "12345"
39 PASS new CompositionEvent('eventType', { data: 18446744073709551615 }).data is "18446744073709552000"
40 PASS new CompositionEvent('eventType', { data: NaN }).data is "NaN"
41 PASS new CompositionEvent('eventType', { data: [] }).data is ""
42 PASS new CompositionEvent('eventType', { data: [1, 2, 3] }).data is "1,2,3"
43 PASS new CompositionEvent('eventType', { data: {koakuma: 12345} }).data is "[object Object]"
44 PASS new CompositionEvent('eventType', { data: {valueOf: function () { return 'koakuma'; } } }).data is "[object Object]"
45 PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).bubbles is true
46 PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).cancelable is true
47 PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).view is window
48 PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).detail is 111
49 PASS new CompositionEvent('eventType', { bubbles: true, cancelable: true, view: window, detail: 111, data: 'koakuma' }).data is "koakuma"
50 PASS successfullyParsed is true