blob: d2b2f4542a7460e33f288541f6bd02922107e4f0 [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 TypeError: Type error.
PASS worker.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception DataCloneError: The object can not be cloned..
PASS worker.postMessage("notAnArray", channel3.port1) threw exception TypeError: Type error.
PASS worker.postMessage("notASequence", [{length: 3}]) threw exception DataCloneError: The object can not be cloned..
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