1 CONSOLE WARNING: MessagePort cannot send an ArrayBuffer as a transferable object yet. See http://crbug.com/334408
2 CONSOLE WARNING: MessagePort cannot send an ArrayBuffer as a transferable object yet. See http://crbug.com/334408
3 Tests various use cases when cloning MessagePorts.
5 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
8 PASS channel.port1.postMessage('msg', [channel.port1]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 contains the source port..
9 Posting port to entangled pair neuters the port and does nothing else:
10 PASS channel2.port1.postMessage('msg', [channel.port2]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 is already neutered..
11 Posting a neutered ArrayBuffer should throw.
12 PASS channel.port1.postMessage(arrayBuffer, []) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': An ArrayBuffer is neutered and could not be cloned..
13 Posting a neutered ArrayBufferView should throw.
14 PASS channel.port1.postMessage('msg', [uint16Array]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type..
15 PASS channel.port1.postMessage(uint16Array, []) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': An ArrayBuffer is neutered and could not be cloned..
16 PASS channel.port1.postMessage('msg', [channel2.port1]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 is already neutered..
17 PASS testEvent.ports.length is 1
18 PASS parseInt(testEvent.data) is 1
19 PASS parseInt(testEvent.data) is 2
20 PASS parseInt(testEvent.data) is 3
21 PASS Posted messages to cloned port.
22 PASS testEvent.data is 'testme'
23 PASS testEvent.ports is not null
24 PASS testEvent.ports.length is 1
25 PASS testEvent.data is 'closed'
26 PASS successfullyParsed is true