1 This tests the constructor for the ErrorEvent DOM class.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS new ErrorEvent('eventType').bubbles is false
7 PASS new ErrorEvent('eventType').cancelable is false
8 PASS new ErrorEvent('eventType').message is ""
9 PASS new ErrorEvent('eventType').filename is ""
10 PASS new ErrorEvent('eventType').lineno is 0
11 PASS new ErrorEvent('eventType', { bubbles: false }).bubbles is false
12 PASS new ErrorEvent('eventType', { bubbles: true }).bubbles is true
13 PASS new ErrorEvent('eventType', { cancelable: false }).cancelable is false
14 PASS new ErrorEvent('eventType', { cancelable: true }).cancelable is true
15 PASS new ErrorEvent('eventType', { message: 'melancholy' }).message is "melancholy"
16 PASS new ErrorEvent('eventType', { message: '' }).message is ""
17 PASS new ErrorEvent('eventType', { message: undefined }).message is ""
18 PASS new ErrorEvent('eventType', { message: null }).message is "null"
19 PASS new ErrorEvent('eventType', { message: false }).message is "false"
20 PASS new ErrorEvent('eventType', { message: true }).message is "true"
21 PASS new ErrorEvent('eventType', { message: 12345 }).message is "12345"
22 PASS new ErrorEvent('eventType', { message: 18446744073709551615 }).message is "18446744073709552000"
23 PASS new ErrorEvent('eventType', { message: NaN }).message is "NaN"
24 PASS new ErrorEvent('eventType', { message: [] }).message is ""
25 PASS new ErrorEvent('eventType', { message: [1, 2, 3] }).message is "1,2,3"
26 PASS new ErrorEvent('eventType', { message: {melancholy: 12345} }).message is "[object Object]"
27 PASS new ErrorEvent('eventType', { message: {valueOf: function () { return 'melancholy'; } } }).message is "[object Object]"
28 PASS new ErrorEvent('eventType', { filename: 'melancholy' }).filename is "melancholy"
29 PASS new ErrorEvent('eventType', { filename: '' }).filename is ""
30 PASS new ErrorEvent('eventType', { filename: undefined }).filename is ""
31 PASS new ErrorEvent('eventType', { filename: null }).filename is "null"
32 PASS new ErrorEvent('eventType', { filename: false }).filename is "false"
33 PASS new ErrorEvent('eventType', { filename: true }).filename is "true"
34 PASS new ErrorEvent('eventType', { filename: 12345 }).filename is "12345"
35 PASS new ErrorEvent('eventType', { filename: 18446744073709551615 }).filename is "18446744073709552000"
36 PASS new ErrorEvent('eventType', { filename: NaN }).filename is "NaN"
37 PASS new ErrorEvent('eventType', { filename: [] }).filename is ""
38 PASS new ErrorEvent('eventType', { filename: [1, 2, 3] }).filename is "1,2,3"
39 PASS new ErrorEvent('eventType', { filename: {melancholy: 12345} }).filename is "[object Object]"
40 PASS new ErrorEvent('eventType', { filename: {valueOf: function () { return 'melancholy'; } } }).filename is "[object Object]"
41 PASS new ErrorEvent('eventType', { lineno: 0 }).lineno is 0
42 PASS new ErrorEvent('eventType', { lineno: 1 }).lineno is 1
43 PASS new ErrorEvent('eventType', { lineno: 4294967294 }).lineno is 4294967294
44 PASS new ErrorEvent('eventType', { lineno: 4294967295 }).lineno is 4294967295
45 PASS new ErrorEvent('eventType', { lineno: 9007199254740991 }).lineno is 4294967295
46 PASS new ErrorEvent('eventType', { lineno: 18446744073709551615 }).lineno is 0
47 PASS new ErrorEvent('eventType', { lineno: 12345678901234567890 }).lineno is 3944679424
48 PASS new ErrorEvent('eventType', { lineno: -1 }).lineno is 4294967295
49 PASS new ErrorEvent('eventType', { lineno: 123.45 }).lineno is 123
50 PASS new ErrorEvent('eventType', { lineno: NaN }).lineno is 0
51 PASS new ErrorEvent('eventType', { lineno: undefined }).lineno is 0
52 PASS new ErrorEvent('eventType', { lineno: null }).lineno is 0
53 PASS new ErrorEvent('eventType', { lineno: '' }).lineno is 0
54 PASS new ErrorEvent('eventType', { lineno: '12345' }).lineno is 12345
55 PASS new ErrorEvent('eventType', { lineno: '12345a' }).lineno is 0
56 PASS new ErrorEvent('eventType', { lineno: 'abc' }).lineno is 0
57 PASS new ErrorEvent('eventType', { lineno: [] }).lineno is 0
58 PASS new ErrorEvent('eventType', { lineno: [12345] }).lineno is 12345
59 PASS new ErrorEvent('eventType', { lineno: [12345, 67890] }).lineno is 0
60 PASS new ErrorEvent('eventType', { lineno: {} }).lineno is 0
61 PASS new ErrorEvent('eventType', { lineno: {moemoe: 12345} }).lineno is 0
62 PASS new ErrorEvent('eventType', { lineno: {valueOf: function () { return 12345; }} }).lineno is 12345
63 PASS new ErrorEvent('eventType', { colno: 0 }).colno is 0
64 PASS new ErrorEvent('eventType', { colno: 1 }).colno is 1
65 PASS new ErrorEvent('eventType', { colno: 4294967294 }).colno is 4294967294
66 PASS new ErrorEvent('eventType', { colno: 4294967295 }).colno is 4294967295
67 PASS new ErrorEvent('eventType', { colno: 9007199254740991 }).colno is 4294967295
68 PASS new ErrorEvent('eventType', { colno: 18446744073709551615 }).colno is 0
69 PASS new ErrorEvent('eventType', { colno: 12345678901234567890 }).colno is 3944679424
70 PASS new ErrorEvent('eventType', { colno: -1 }).colno is 4294967295
71 PASS new ErrorEvent('eventType', { colno: 123.45 }).colno is 123
72 PASS new ErrorEvent('eventType', { colno: NaN }).colno is 0
73 PASS new ErrorEvent('eventType', { colno: undefined }).colno is 0
74 PASS new ErrorEvent('eventType', { colno: null }).colno is 0
75 PASS new ErrorEvent('eventType', { colno: '' }).colno is 0
76 PASS new ErrorEvent('eventType', { colno: '12345' }).colno is 12345
77 PASS new ErrorEvent('eventType', { colno: '12345a' }).colno is 0
78 PASS new ErrorEvent('eventType', { colno: 'abc' }).colno is 0
79 PASS new ErrorEvent('eventType', { colno: [] }).colno is 0
80 PASS new ErrorEvent('eventType', { colno: [12345] }).colno is 12345
81 PASS new ErrorEvent('eventType', { colno: [12345, 67890] }).colno is 0
82 PASS new ErrorEvent('eventType', { colno: {} }).colno is 0
83 PASS new ErrorEvent('eventType', { colno: {moemoe: 12345} }).colno is 0
84 PASS new ErrorEvent('eventType', { colno: {valueOf: function () { return 12345; }} }).colno is 12345
85 PASS new ErrorEvent('eventType', { error: { moemoe: 12345 } }).error.moemoe is 12345
86 PASS new ErrorEvent('eventType', { error: { message: 'Message' } }).error.message is "Message"
87 PASS new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).bubbles is true
88 PASS new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).cancelable is true
89 PASS new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).message is "sakuranbo"
90 PASS new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).filename is "amaenbo"
91 PASS new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).lineno is 12345
92 PASS new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).colno is 23456
93 PASS new ErrorEvent('eventType', { bubbles: true, cancelable: true, message: 'sakuranbo', filename: 'amaenbo', lineno: 12345, colno: 23456, error: { message: 'hi' } }).error.message is "hi"
94 PASS successfullyParsed is true