1 This tests the constructor for the CloseEvent DOM class.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS new CloseEvent('eventType').bubbles is false
7 PASS new CloseEvent('eventType').cancelable is false
8 PASS new CloseEvent('eventType').wasClean is false
9 PASS new CloseEvent('eventType').code is 0
10 PASS new CloseEvent('eventType').reason is ""
11 PASS new CloseEvent('eventType', { bubbles: false }).bubbles is false
12 PASS new CloseEvent('eventType', { bubbles: true }).bubbles is true
13 PASS new CloseEvent('eventType', { cancelable: false }).cancelable is false
14 PASS new CloseEvent('eventType', { cancelable: true }).cancelable is true
15 PASS new CloseEvent('eventType', { wasClean: false }).wasClean is false
16 PASS new CloseEvent('eventType', { wasClean: true }).wasClean is true
17 PASS new CloseEvent('eventType', { reason: 'koakuma' }).reason is "koakuma"
18 PASS new CloseEvent('eventType', { reason: '' }).reason is ""
19 PASS new CloseEvent('eventType', { reason: undefined }).reason is ""
20 PASS new CloseEvent('eventType', { reason: null }).reason is "null"
21 PASS new CloseEvent('eventType', { reason: false }).reason is "false"
22 PASS new CloseEvent('eventType', { reason: true }).reason is "true"
23 PASS new CloseEvent('eventType', { reason: 12345 }).reason is "12345"
24 PASS new CloseEvent('eventType', { reason: 18446744073709551615 }).reason is "18446744073709552000"
25 PASS new CloseEvent('eventType', { reason: NaN }).reason is "NaN"
26 PASS new CloseEvent('eventType', { reason: [] }).reason is ""
27 PASS new CloseEvent('eventType', { reason: [1, 2, 3] }).reason is "1,2,3"
28 PASS new CloseEvent('eventType', { reason: {koakuma: 12345} }).reason is "[object Object]"
29 PASS new CloseEvent('eventType', { reason: {valueOf: function () { return 'koakuma'; } } }).reason is "[object Object]"
30 PASS new CloseEvent('eventType', { code: 0 }).code is 0
31 PASS new CloseEvent('eventType', { code: 1 }).code is 1
32 PASS new CloseEvent('eventType', { code: 65534 }).code is 65534
33 PASS new CloseEvent('eventType', { code: 65535 }).code is 65535
34 PASS new CloseEvent('eventType', { code: 9007199254740991 }).code is 65535
35 PASS new CloseEvent('eventType', { code: 18446744073709551615 }).code is 0
36 PASS new CloseEvent('eventType', { code: 12345678901234567890 }).code is 2048
37 PASS new CloseEvent('eventType', { code: -1 }).code is 65535
38 PASS new CloseEvent('eventType', { code: 123.45 }).code is 123
39 PASS new CloseEvent('eventType', { code: NaN }).code is 0
40 PASS new CloseEvent('eventType', { code: undefined }).code is 0
41 PASS new CloseEvent('eventType', { code: null }).code is 0
42 PASS new CloseEvent('eventType', { code: '' }).code is 0
43 PASS new CloseEvent('eventType', { code: '12345' }).code is 12345
44 PASS new CloseEvent('eventType', { code: '12345a' }).code is 0
45 PASS new CloseEvent('eventType', { code: 'abc' }).code is 0
46 PASS new CloseEvent('eventType', { code: [] }).code is 0
47 PASS new CloseEvent('eventType', { code: [12345] }).code is 12345
48 PASS new CloseEvent('eventType', { code: [12345, 67890] }).code is 0
49 PASS new CloseEvent('eventType', { code: {} }).code is 0
50 PASS new CloseEvent('eventType', { code: {moemoe: 12345} }).code is 0
51 PASS new CloseEvent('eventType', { code: {valueOf: function () { return 12345; }} }).code is 12345
52 PASS new CloseEvent('eventType', { bubbles: true, cancelable: true, wasClean: true, code : 12345, reason: 'koakuma' }).bubbles is true
53 PASS new CloseEvent('eventType', { bubbles: true, cancelable: true, wasClean: true, code : 12345, reason: 'koakuma' }).cancelable is true
54 PASS new CloseEvent('eventType', { bubbles: true, cancelable: true, wasClean: true, code : 12345, reason: 'koakuma' }).wasClean is true
55 PASS new CloseEvent('eventType', { bubbles: true, cancelable: true, wasClean: true, code : 12345, reason: 'koakuma' }).code is 12345
56 PASS new CloseEvent('eventType', { bubbles: true, cancelable: true, wasClean: true, code : 12345, reason: 'koakuma' }).reason is "koakuma"
57 PASS successfullyParsed is true