1 This test checks the various use cases around sending multiple ports through WorkerGlobalScope.postMessage
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS successfullyParsed is true
9 PASS event.ports is non-null and zero length when no port sent
10 PASS event.ports is non-null and zero length when empty array sent
11 PASS event.ports contains two ports when two ports sent
12 PASS posting a null port did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 1 is an untransferable 'null' value.
13 PASS posting a non-port did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 1 does not have a transferable type.
14 PASS event.ports contains two ports when two ports re-sent after error
15 PASS posting a non-array did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': The 2nd argument is neither an array, nor does it have indexed properties.
16 PASS posting a non-sequence did throw: TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': Value at index 0 does not have a transferable type.