OLD | NEW |
1 Tests various use cases when cloning MessagePorts. | 1 Tests various use cases when cloning MessagePorts. |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 PASS channel.port1.postMessage('msg', [channel.port1]) threw exception DataClone
Error: Failed to execute 'postMessage' on 'MessagePort': Item #0 in the array of
ports contains the source port.. | 6 PASS channel.port1.postMessage('msg', [channel.port1]) threw exception DataClone
Error: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 contain
s the source port.. |
7 Posting port to entangled pair neuters the port and does nothing else: | 7 Posting port to entangled pair neuters the port and does nothing else: |
8 PASS channel2.port1.postMessage('msg', [channel.port2]) threw exception DataClon
eError: Failed to execute 'postMessage' on 'MessagePort': Item #0 in the array o
f ports is already neutered.. | 8 PASS channel2.port1.postMessage('msg', [channel.port2]) threw exception DataClon
eError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 is alr
eady neutered.. |
9 PASS channel.port1.postMessage('msg', [channel2.port1]) threw exception DataClon
eError: Failed to execute 'postMessage' on 'MessagePort': Item #0 in the array o
f ports is already neutered.. | 9 Posting a neutered ArrayBuffer should throw. |
| 10 PASS channel.port1.postMessage(arrayBuffer, []) threw exception DataCloneError:
Failed to execute 'postMessage' on 'MessagePort': An object could not be cloned.
. |
| 11 Posting a neutered ArrayBufferView should throw. |
| 12 PASS channel.port1.postMessage('msg', [uint16Array]) threw exception DataCloneEr
ror: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not
have a transferable type.. |
| 13 PASS channel.port1.postMessage(uint16Array, []) threw exception DataCloneError:
Failed to execute 'postMessage' on 'MessagePort': An object could not be cloned.
. |
| 14 PASS channel.port1.postMessage('msg', [channel2.port1]) threw exception DataClon
eError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 is alr
eady neutered.. |
10 PASS testEvent.ports.length is 1 | 15 PASS testEvent.ports.length is 1 |
11 PASS parseInt(testEvent.data) is 1 | 16 PASS parseInt(testEvent.data) is 1 |
12 PASS parseInt(testEvent.data) is 2 | 17 PASS parseInt(testEvent.data) is 2 |
13 PASS parseInt(testEvent.data) is 3 | 18 PASS parseInt(testEvent.data) is 3 |
14 PASS Posted messages to cloned port. | 19 PASS Posted messages to cloned port. |
15 PASS testEvent.data is 'testme' | 20 PASS testEvent.data is 'testme' |
16 PASS testEvent.ports is not null | 21 PASS testEvent.ports is not null |
17 PASS testEvent.ports.length is 1 | 22 PASS testEvent.ports.length is 1 |
18 PASS testEvent.data is 'closed' | 23 PASS testEvent.data is 'closed' |
19 PASS successfullyParsed is true | 24 PASS successfullyParsed is true |
20 | 25 |
21 TEST COMPLETE | 26 TEST COMPLETE |
22 | 27 |
OLD | NEW |