blob: 92e191a3fb0ca3dc3e7e1af21a35b335e2eac5f4 [file] [log] [blame]
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: InvalidStateError: DOM Exception 11.
PASS worker.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception TypeError: Type error.
PASS worker.postMessage("notAnArray", channel3.port1) threw exception TypeError: Value is not a sequence.
PASS worker.postMessage("notASequence", [{length: 3}]) threw exception TypeError: Type error.
PASS event.ports is non-null and zero length when no port sent
PASS event.ports is non-null and zero length 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