This test checks the various use cases around sending multiple ports through Worker.postMessage

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS worker.postMessage("null port", [channel3.port1, null, channel3.port2]) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
PASS worker.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception TypeError: MessagePortArray argument must contain only MessagePorts.
PASS worker.postMessage("notAnArray", channel3.port1) threw exception TypeError: MessagePortArray argument has no length attribute.
PASS worker.postMessage("notASequence", [{length: 3}]) threw exception TypeError: MessagePortArray argument must contain only MessagePorts.
PASS event.ports is null when no port sent
PASS event.ports is null when empty array sent
PASS event.ports contains two ports when two ports sent
PASS event.ports contains two ports when two ports re-sent after error

TEST COMPLETE

