OLD | NEW |
| (Empty) |
1 This tests the constructor for the ServiceWorkerMessageEvent DOM class. | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 PASS new ServiceWorkerMessageEvent('eventType').bubbles is false | |
7 PASS new ServiceWorkerMessageEvent('eventType').cancelable is false | |
8 PASS new ServiceWorkerMessageEvent('eventType').data is null | |
9 PASS new ServiceWorkerMessageEvent('eventType').origin is "" | |
10 PASS new ServiceWorkerMessageEvent('eventType').lastEventId is "" | |
11 PASS new ServiceWorkerMessageEvent('eventType').source is null | |
12 PASS new ServiceWorkerMessageEvent('eventType').ports is null | |
13 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: false }).bubbles is f
alse | |
14 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true }).bubbles is tr
ue | |
15 PASS new ServiceWorkerMessageEvent('eventType', { cancelable: false }).cancelabl
e is false | |
16 PASS new ServiceWorkerMessageEvent('eventType', { cancelable: true }).cancelable
is true | |
17 PASS new ServiceWorkerMessageEvent('eventType', { data: test_object }).data is t
est_object | |
18 PASS new ServiceWorkerMessageEvent('eventType', { data: document }).data is docu
ment | |
19 PASS new ServiceWorkerMessageEvent('eventType', { data: undefined }).data is nul
l | |
20 PASS new ServiceWorkerMessageEvent('eventType', { data: null }).data is null | |
21 PASS new ServiceWorkerMessageEvent('eventType', { data: false }).data is false | |
22 PASS new ServiceWorkerMessageEvent('eventType', { data: true }).data is true | |
23 PASS new ServiceWorkerMessageEvent('eventType', { data: '' }).data is "" | |
24 PASS new ServiceWorkerMessageEvent('eventType', { data: 'chocolate' }).data is "
chocolate" | |
25 PASS new ServiceWorkerMessageEvent('eventType', { data: 12345 }).data is 12345 | |
26 PASS new ServiceWorkerMessageEvent('eventType', { data: 18446744073709551615 }).
data is 18446744073709552000 | |
27 PASS new ServiceWorkerMessageEvent('eventType', { data: NaN }).data is NaN | |
28 PASS new ServiceWorkerMessageEvent('eventType', { data: {valueOf: function () {
return test_object; } } }).data == test_object is false | |
29 PASS new ServiceWorkerMessageEvent('eventType', { get data() { return 123; } }).
data is 123 | |
30 PASS new ServiceWorkerMessageEvent('eventType', { get data() { throw 'ServiceWor
kerMessageEvent Error'; } }) threw exception ServiceWorkerMessageEvent Error. | |
31 PASS new ServiceWorkerMessageEvent('eventType', { origin: 'melancholy' }).origin
is "melancholy" | |
32 PASS new ServiceWorkerMessageEvent('eventType', { origin: '' }).origin is "" | |
33 PASS new ServiceWorkerMessageEvent('eventType', { origin: undefined }).origin is
"" | |
34 PASS new ServiceWorkerMessageEvent('eventType', { origin: null }).origin is "nul
l" | |
35 PASS new ServiceWorkerMessageEvent('eventType', { origin: false }).origin is "fa
lse" | |
36 PASS new ServiceWorkerMessageEvent('eventType', { origin: true }).origin is "tru
e" | |
37 PASS new ServiceWorkerMessageEvent('eventType', { origin: 12345 }).origin is "12
345" | |
38 PASS new ServiceWorkerMessageEvent('eventType', { origin: 18446744073709551615 }
).origin is "18446744073709552000" | |
39 PASS new ServiceWorkerMessageEvent('eventType', { origin: NaN }).origin is "NaN" | |
40 PASS new ServiceWorkerMessageEvent('eventType', { origin: [] }).origin is "" | |
41 PASS new ServiceWorkerMessageEvent('eventType', { origin: [1, 2, 3] }).origin is
"1,2,3" | |
42 PASS new ServiceWorkerMessageEvent('eventType', { origin: {melancholy: 12345} })
.origin is "[object Object]" | |
43 PASS new ServiceWorkerMessageEvent('eventType', { origin: {valueOf: function ()
{ return 'melancholy'; } } }).origin is "[object Object]" | |
44 PASS new ServiceWorkerMessageEvent('eventType', { get origin() { return 123; } }
).origin is "123" | |
45 PASS new ServiceWorkerMessageEvent('eventType', { get origin() { throw 'ServiceW
orkerMessageEvent Error'; } }) threw exception ServiceWorkerMessageEvent Error. | |
46 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: 'melancholy' }).l
astEventId is "melancholy" | |
47 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: '' }).lastEventId
is "" | |
48 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: undefined }).last
EventId is "" | |
49 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: null }).lastEvent
Id is "null" | |
50 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: false }).lastEven
tId is "false" | |
51 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: true }).lastEvent
Id is "true" | |
52 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: 12345 }).lastEven
tId is "12345" | |
53 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: 18446744073709551
615 }).lastEventId is "18446744073709552000" | |
54 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: NaN }).lastEventI
d is "NaN" | |
55 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: [] }).lastEventId
is "" | |
56 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: [1, 2, 3] }).last
EventId is "1,2,3" | |
57 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: {melancholy: 1234
5} }).lastEventId is "[object Object]" | |
58 PASS new ServiceWorkerMessageEvent('eventType', { lastEventId: {valueOf: functio
n () { return 'melancholy'; } } }).lastEventId is "[object Object]" | |
59 PASS new ServiceWorkerMessageEvent('eventType', { get lastEventId() { return 123
; } }).lastEventId is "123" | |
60 PASS new ServiceWorkerMessageEvent('eventType', { get lastEventId() { throw 'Ser
viceWorkerMessageEvent Error'; } }) threw exception ServiceWorkerMessageEvent Er
ror. | |
61 PASS new ServiceWorkerMessageEvent('eventType', { ports: [channel.port1], source
: channel.port1 }).source is channel.port1 | |
62 PASS new ServiceWorkerMessageEvent('eventType', { source: window }).source threw
exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The provi
ded value is not of type '(ServiceWorker or MessagePort)'. | |
63 PASS new ServiceWorkerMessageEvent('eventType', { source: this }).source threw e
xception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The provide
d value is not of type '(ServiceWorker or MessagePort)'. | |
64 PASS new ServiceWorkerMessageEvent('eventType', { source: test_object }).source
threw exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The
provided value is not of type '(ServiceWorker or MessagePort)'. | |
65 PASS new ServiceWorkerMessageEvent('eventType', { source: document }).source thr
ew exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The pro
vided value is not of type '(ServiceWorker or MessagePort)'. | |
66 PASS new ServiceWorkerMessageEvent('eventType', { source: document.body }).sourc
e threw exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': Th
e provided value is not of type '(ServiceWorker or MessagePort)'. | |
67 PASS new ServiceWorkerMessageEvent('eventType', { source: undefined }).source is
null | |
68 PASS new ServiceWorkerMessageEvent('eventType', { source: null }).source is null | |
69 PASS new ServiceWorkerMessageEvent('eventType', { source: false }).source threw
exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The provid
ed value is not of type '(ServiceWorker or MessagePort)'. | |
70 PASS new ServiceWorkerMessageEvent('eventType', { source: true }).source threw e
xception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The provide
d value is not of type '(ServiceWorker or MessagePort)'. | |
71 PASS new ServiceWorkerMessageEvent('eventType', { source: '' }).source threw exc
eption TypeError: Failed to construct 'ServiceWorkerMessageEvent': The provided
value is not of type '(ServiceWorker or MessagePort)'. | |
72 PASS new ServiceWorkerMessageEvent('eventType', { source: 'chocolate' }).source
threw exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The
provided value is not of type '(ServiceWorker or MessagePort)'. | |
73 PASS new ServiceWorkerMessageEvent('eventType', { source: 12345 }).source threw
exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The provid
ed value is not of type '(ServiceWorker or MessagePort)'. | |
74 PASS new ServiceWorkerMessageEvent('eventType', { source: 18446744073709551615 }
).source threw exception TypeError: Failed to construct 'ServiceWorkerMessageEve
nt': The provided value is not of type '(ServiceWorker or MessagePort)'. | |
75 PASS new ServiceWorkerMessageEvent('eventType', { source: NaN }).source threw ex
ception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The provided
value is not of type '(ServiceWorker or MessagePort)'. | |
76 PASS new ServiceWorkerMessageEvent('eventType', { source: {valueOf: function ()
{ return window; } } }).source == window threw exception TypeError: Failed to co
nstruct 'ServiceWorkerMessageEvent': The provided value is not of type '(Service
Worker or MessagePort)'. | |
77 PASS new ServiceWorkerMessageEvent('eventType', { get source() { return channel.
port1; } }).source is channel.port1 | |
78 PASS new ServiceWorkerMessageEvent('eventType', { get source() { return 123; } }
).source threw exception TypeError: Failed to construct 'ServiceWorkerMessageEve
nt': The provided value is not of type '(ServiceWorker or MessagePort)'. | |
79 PASS new ServiceWorkerMessageEvent('eventType', { get source() { throw 'ServiceW
orkerMessageEvent Error'; } }) threw exception ServiceWorkerMessageEvent Error. | |
80 PASS new ServiceWorkerMessageEvent('eventType', { ports: [channel.port1, channel
.port2, channel2.port1] }).ports[0] is channel.port1 | |
81 PASS new ServiceWorkerMessageEvent('eventType', { ports: [channel.port1, channel
.port2, channel2.port1] }).ports[1] is channel.port2 | |
82 PASS new ServiceWorkerMessageEvent('eventType', { ports: [channel.port1, channel
.port2, channel2.port1] }).ports[2] is channel2.port1 | |
83 PASS new ServiceWorkerMessageEvent('eventType', { ports: [] }).ports is [] | |
84 PASS new ServiceWorkerMessageEvent('eventType', { ports: undefined }).ports is n
ull | |
85 PASS new ServiceWorkerMessageEvent('eventType', { ports: null }).ports threw exc
eption TypeError: Failed to construct 'ServiceWorkerMessageEvent': The value pro
vided is neither an array, nor does it have indexed properties.. | |
86 PASS new ServiceWorkerMessageEvent('eventType', { ports: [1, 2, 3] }).ports[2] t
hrew exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': Inval
id Array element type. | |
87 PASS new ServiceWorkerMessageEvent('eventType', { ports: test_object }).ports th
rew exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The va
lue provided is neither an array, nor does it have indexed properties.. | |
88 PASS new ServiceWorkerMessageEvent('eventType', { ports: document }).ports threw
exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The value
provided is neither an array, nor does it have indexed properties.. | |
89 PASS new ServiceWorkerMessageEvent('eventType', { ports: false }).ports threw ex
ception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The value pr
ovided is neither an array, nor does it have indexed properties.. | |
90 PASS new ServiceWorkerMessageEvent('eventType', { ports: true }).ports threw exc
eption TypeError: Failed to construct 'ServiceWorkerMessageEvent': The value pro
vided is neither an array, nor does it have indexed properties.. | |
91 PASS new ServiceWorkerMessageEvent('eventType', { ports: '' }).ports threw excep
tion TypeError: Failed to construct 'ServiceWorkerMessageEvent': The value provi
ded is neither an array, nor does it have indexed properties.. | |
92 PASS new ServiceWorkerMessageEvent('eventType', { ports: 'chocolate' }).ports th
rew exception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The va
lue provided is neither an array, nor does it have indexed properties.. | |
93 PASS new ServiceWorkerMessageEvent('eventType', { ports: 12345 }).ports threw ex
ception TypeError: Failed to construct 'ServiceWorkerMessageEvent': The value pr
ovided is neither an array, nor does it have indexed properties.. | |
94 PASS new ServiceWorkerMessageEvent('eventType', { ports: 18446744073709551615 })
.ports threw exception TypeError: Failed to construct 'ServiceWorkerMessageEvent
': The value provided is neither an array, nor does it have indexed properties.. | |
95 PASS new ServiceWorkerMessageEvent('eventType', { ports: NaN }).ports threw exce
ption TypeError: Failed to construct 'ServiceWorkerMessageEvent': The value prov
ided is neither an array, nor does it have indexed properties.. | |
96 PASS new ServiceWorkerMessageEvent('eventType', { get ports() { return 123; } })
.ports threw exception TypeError: Failed to construct 'ServiceWorkerMessageEvent
': The value provided is neither an array, nor does it have indexed properties.. | |
97 PASS new ServiceWorkerMessageEvent('eventType', { get ports() { throw 'ServiceWo
rkerMessageEvent Error'; } }) threw exception ServiceWorkerMessageEvent Error. | |
98 PASS new ServiceWorkerMessageEvent('eventType', { ports: {valueOf: function () {
return [channel.port1, channel.port2, channel.port2]; } } }).ports[0] threw exc
eption TypeError: Failed to construct 'ServiceWorkerMessageEvent': The value pro
vided is neither an array, nor does it have indexed properties.. | |
99 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).bubbles is true | |
100 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).cancelable is true | |
101 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).data is test_object | |
102 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).origin is "wonderful
" | |
103 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).lastEventId is "exce
llent" | |
104 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).source is port | |
105 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).ports[0] is channel.
port1 | |
106 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).ports[1] is channel.
port2 | |
107 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: [channel.port1, channel.port2, channel2.port1] }).ports[2] is channel2
.port1 | |
108 PASS new ServiceWorkerMessageEvent('eventType', { bubbles: true, cancelable: tru
e, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: por
t, ports: {length: 3, 0: channel.port1, 1: channel.port2, 2: channel2.port1} }).
ports[2] is channel2.port1 | |
109 PASS successfullyParsed is true | |
110 | |
111 TEST COMPLETE | |
112 | |
OLD | NEW |