blob: 25fe7723b7b0710e17bfbdd64b7acba7e7066013 [file] [log] [blame]
This test checks the various use cases around sending multiple ports through WorkerGlobalScope.postMessage
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
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 posting a null port did throw: Error: InvalidStateError: DOM Exception 11
PASS posting a non-port did throw: TypeError: Type error
PASS event.ports contains two ports when two ports re-sent after error
PASS posting a non-array did throw: TypeError: Value is not a sequence
PASS posting a non-sequence did throw: TypeError: Type error
TEST COMPLETE