28 lines
1.9 KiB
Plaintext
28 lines
1.9 KiB
Plaintext
This test checks the various use cases around sending multiple ports through MessagePort.postMessage
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
PASS channel.port1.postMessage("same port", [channel.port1]) threw exception DataCloneError: The object can not be cloned..
|
|
PASS channel.port1.postMessage("entangled port", [channel.port2]) threw exception DataCloneError: The object can not be cloned..
|
|
PASS channel.port1.postMessage("null port", [channel3.port1, null, channel3.port2]) threw exception TypeError: Type error.
|
|
PASS channel.port1.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception DataCloneError: The object can not be cloned..
|
|
PASS channel.port1.postMessage("duplicate port", [channel3.port1, channel3.port1]) threw exception DataCloneError: Duplicate transferable for structured clone.
|
|
PASS channel.port1.postMessage("notAnArray", "foo") threw exception TypeError: Type error.
|
|
PASS channel.port1.postMessage("notASequence", [{length: 3}]) threw exception DataCloneError: The object can not be cloned..
|
|
PASS channel.port1.postMessage("largeSequence", largePortArray) 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
|
|
PASS Sending host object has thrown DataCloneError: The object can not be cloned.
|
|
PASS Sending host object has thrown DataCloneError: The object can not be cloned.
|
|
PASS Sending Function object has thrown DataCloneError: The object can not be cloned.
|
|
PASS Sending Error object has thrown DataCloneError: The object can not be cloned.
|
|
PASS send-port: transferred one port
|
|
PASS send-port-twice: transferred one port twice
|
|
PASS send-two-ports: transferred two ports
|
|
|
|
TEST COMPLETE
|
|
|