This tests the constructor for the MessageEvent DOM class. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS new MessageEvent('eventType').bubbles is false PASS new MessageEvent('eventType').cancelable is false PASS new MessageEvent('eventType').data is null PASS new MessageEvent('eventType').origin is "" PASS new MessageEvent('eventType').lastEventId is "" PASS new MessageEvent('eventType').source is null PASS new MessageEvent('eventType').ports is [] PASS new MessageEvent('eventType', { bubbles: false }).bubbles is false PASS new MessageEvent('eventType', { bubbles: true }).bubbles is true PASS new MessageEvent('eventType', { cancelable: false }).cancelable is false PASS new MessageEvent('eventType', { cancelable: true }).cancelable is true PASS new MessageEvent('eventType', { data: test_object }).data is test_object PASS new MessageEvent('eventType', { data: document }).data is document PASS new MessageEvent('eventType', { data: undefined }).data is undefined PASS new MessageEvent('eventType', { data: null }).data is null PASS new MessageEvent('eventType', { data: false }).data is false PASS new MessageEvent('eventType', { data: true }).data is true PASS new MessageEvent('eventType', { data: '' }).data is "" PASS new MessageEvent('eventType', { data: 'chocolate' }).data is "chocolate" PASS new MessageEvent('eventType', { data: 12345 }).data is 12345 PASS new MessageEvent('eventType', { data: 18446744073709551615 }).data is 18446744073709552000 PASS new MessageEvent('eventType', { data: NaN }).data is NaN PASS new MessageEvent('eventType', { data: {valueOf: function () { return test_object; } } }).data == test_object is false PASS new MessageEvent('eventType', { get data() { return 123; } }).data is 123 PASS new MessageEvent('eventType', { get data() { throw 'MessageEvent Error'; } }) threw exception MessageEvent Error. PASS new MessageEvent('eventType', { origin: 'melancholy' }).origin is "melancholy" PASS new MessageEvent('eventType', { origin: '' }).origin is "" PASS new MessageEvent('eventType', { origin: undefined }).origin is "undefined" PASS new MessageEvent('eventType', { origin: null }).origin is "null" PASS new MessageEvent('eventType', { origin: false }).origin is "false" PASS new MessageEvent('eventType', { origin: true }).origin is "true" PASS new MessageEvent('eventType', { origin: 12345 }).origin is "12345" PASS new MessageEvent('eventType', { origin: 18446744073709551615 }).origin is "18446744073709552000" PASS new MessageEvent('eventType', { origin: NaN }).origin is "NaN" PASS new MessageEvent('eventType', { origin: [] }).origin is "" PASS new MessageEvent('eventType', { origin: [1, 2, 3] }).origin is "1,2,3" PASS new MessageEvent('eventType', { origin: {melancholy: 12345} }).origin is "[object Object]" PASS new MessageEvent('eventType', { origin: {valueOf: function () { return 'melancholy'; } } }).origin is "[object Object]" PASS new MessageEvent('eventType', { get origin() { return 123; } }).origin is "123" PASS new MessageEvent('eventType', { get origin() { throw 'MessageEvent Error'; } }) threw exception MessageEvent Error. PASS new MessageEvent('eventType', { lastEventId: 'melancholy' }).lastEventId is "melancholy" PASS new MessageEvent('eventType', { lastEventId: '' }).lastEventId is "" PASS new MessageEvent('eventType', { lastEventId: undefined }).lastEventId is "undefined" PASS new MessageEvent('eventType', { lastEventId: null }).lastEventId is "null" PASS new MessageEvent('eventType', { lastEventId: false }).lastEventId is "false" PASS new MessageEvent('eventType', { lastEventId: true }).lastEventId is "true" PASS new MessageEvent('eventType', { lastEventId: 12345 }).lastEventId is "12345" PASS new MessageEvent('eventType', { lastEventId: 18446744073709551615 }).lastEventId is "18446744073709552000" PASS new MessageEvent('eventType', { lastEventId: NaN }).lastEventId is "NaN" PASS new MessageEvent('eventType', { lastEventId: [] }).lastEventId is "" PASS new MessageEvent('eventType', { lastEventId: [1, 2, 3] }).lastEventId is "1,2,3" PASS new MessageEvent('eventType', { lastEventId: {melancholy: 12345} }).lastEventId is "[object Object]" PASS new MessageEvent('eventType', { lastEventId: {valueOf: function () { return 'melancholy'; } } }).lastEventId is "[object Object]" PASS new MessageEvent('eventType', { get lastEventId() { return 123; } }).lastEventId is "123" PASS new MessageEvent('eventType', { get lastEventId() { throw 'MessageEvent Error'; } }) threw exception MessageEvent Error. PASS new MessageEvent('eventType', { source: window }).source is window PASS new MessageEvent('eventType', { source: this }).source is this PASS new MessageEvent('eventType', { ports: [channel.port1], source: channel.port1 }).source is channel.port1 PASS new MessageEvent('eventType', { source: test_object }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { source: document }).source threw exception TypeError: Failed to construct 'MessageEvent': The optional 'source' property is neither a Window nor MessagePort.. PASS new MessageEvent('eventType', { source: document.body }).source threw exception TypeError: Failed to construct 'MessageEvent': The optional 'source' property is neither a Window nor MessagePort.. PASS new MessageEvent('eventType', { source: undefined }).source is null PASS new MessageEvent('eventType', { source: null }).source is null PASS new MessageEvent('eventType', { source: false }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { source: true }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { source: '' }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { source: 'chocolate' }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { source: 12345 }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { source: 18446744073709551615 }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { source: NaN }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { source: {valueOf: function () { return window; } } }).source == window threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { get source() { return window; } }).source is window PASS new MessageEvent('eventType', { get source() { return 123; } }).source threw exception TypeError: Failed to construct 'MessageEvent': The 'source' property does not have a EventTarget type.. PASS new MessageEvent('eventType', { get source() { throw 'MessageEvent Error'; } }) threw exception MessageEvent Error. PASS new MessageEvent('eventType', { ports: [channel.port1, channel.port2, channel2.port1] }).ports[0] is channel.port1 PASS new MessageEvent('eventType', { ports: [channel.port1, channel.port2, channel2.port1] }).ports[1] is channel.port2 PASS new MessageEvent('eventType', { ports: [channel.port1, channel.port2, channel2.port1] }).ports[2] is channel2.port1 PASS new MessageEvent('eventType', { ports: [] }).ports is [] PASS new MessageEvent('eventType', { ports: undefined }).ports is [] PASS new MessageEvent('eventType', { ports: null }).ports is [] PASS new MessageEvent('eventType', { ports: [1, 2, 3] }).ports[2] threw exception TypeError: Invalid Array element type. PASS new MessageEvent('eventType', { ports: test_object }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { ports: document }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { ports: false }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { ports: true }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { ports: '' }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { ports: 'chocolate' }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { ports: 12345 }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { ports: 18446744073709551615 }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { ports: NaN }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { get ports() { return 123; } }).ports threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { get ports() { throw 'MessageEvent Error'; } }) threw exception MessageEvent Error. PASS new MessageEvent('eventType', { ports: {valueOf: function () { return [channel.port1, channel.port2, channel.port2]; } } }).ports[0] threw exception TypeError: 'ports' property is neither an array, nor does it have indexed properties.. PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).bubbles is true PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).cancelable is true PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).data is test_object PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).origin is "wonderful" PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).lastEventId is "excellent" PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).source is window PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).ports[0] is channel.port1 PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).ports[1] is channel.port2 PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).ports[2] is channel2.port1 PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: {length: 3, 0: channel.port1, 1: channel.port2, 2: channel2.port1} }).ports[2] is channel2.port1 PASS successfullyParsed is true TEST COMPLETE