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