blob: 8f5f7603ac2dc91a9327757bfde4860faa511da2 [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 successfullyParsed is true
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: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Failed to convert value to 'object'.
PASS posting a non-port did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 1 does not have a transferable type.
PASS event.ports contains two ports when two ports re-sent after error
PASS posting a non-sequence did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type.
TEST COMPLETE