Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: LayoutTests/fast/events/message-port-multi-expected.txt

Issue 1022283002: Throw TypeError if value conversion to transferable fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add more tests for TypeError throwing Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 This test checks the various use cases around sending multiple ports through Mes sagePort.postMessage 1 This test checks the various use cases around sending multiple ports through Mes sagePort.postMessage
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("same port", [channel.port1]) threw exception Dat aCloneError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 c ontains the source port.. 6 PASS channel.port1.postMessage("same port", [channel.port1]) threw exception Dat aCloneError: Failed to execute 'postMessage' on 'MessagePort': Port at index 0 c ontains the source port..
7 PASS channel.port1.postMessage("null port", [channel3.port1, null, channel3.port 2]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessageP ort': Value at index 1 is an untransferable 'null' value.. 7 PASS channel.port1.postMessage("null port", [channel3.port1, null, channel3.port 2]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 1 is an untransferable 'null' value..
8 PASS channel.port1.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort ': Value at index 1 does not have a transferable type.. 8 PASS channel.port1.postMessage("notAPort", [channel3.port1, {}, channel3.port2]) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Va lue at index 1 does not have a transferable type..
9 PASS channel.port1.postMessage("duplicate port", [channel3.port1, channel3.port1 ]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePo rt': Message port at index 1 is a duplicate of an earlier port.. 9 PASS channel.port1.postMessage("duplicate port", [channel3.port1, channel3.port1 ]) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePo rt': Message port at index 1 is a duplicate of an earlier port..
10 PASS channel.port1.postMessage("notAnArray", channel3.port1) threw exception Typ eError: Failed to execute 'postMessage' on 'MessagePort': The 2nd argument is ne ither an array, nor does it have indexed properties.. 10 PASS channel.port1.postMessage("notAnArray", channel3.port1) threw exception Typ eError: Failed to execute 'postMessage' on 'MessagePort': The 2nd argument is ne ither an array, nor does it have indexed properties..
11 PASS channel.port1.postMessage("notASequence", [{length: 3}]) threw exception Da taCloneError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type.. 11 PASS channel.port1.postMessage("notASequence", [{length: 3}]) threw exception Ty peError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 does not have a transferable type..
12 PASS channel.port1.postMessage("duplicate buffer", [arrayBuffer, arrayBuffer]) t hrew exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': ArrayBuffer at index 1 is a duplicate of an earlier ArrayBuffer.. 12 PASS channel.port1.postMessage("duplicate buffer", [arrayBuffer, arrayBuffer]) t hrew exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': ArrayBuffer at index 1 is a duplicate of an earlier ArrayBuffer..
13 PASS channel.port1.postMessage("largeSequence", largePortArray) threw exception DataCloneError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 is an untransferable 'undefined' value.. 13 PASS channel.port1.postMessage("largeSequence", largePortArray) threw exception TypeError: Failed to execute 'postMessage' on 'MessagePort': Value at index 0 is an untransferable 'undefined' value..
14 PASS successfullyParsed is true 14 PASS successfullyParsed is true
15 15
16 TEST COMPLETE 16 TEST COMPLETE
17 PASS event.ports is non-null and zero length when no port sent 17 PASS event.ports is non-null and zero length when no port sent
18 PASS event.ports is non-null and zero length when empty array sent 18 PASS event.ports is non-null and zero length when empty array sent
19 PASS event.ports contains two ports when two ports sent 19 PASS event.ports contains two ports when two ports sent
20 PASS event.ports contains two ports when two ports re-sent after error 20 PASS event.ports contains two ports when two ports re-sent after error
21 PASS Sending host object has thrown DataCloneError: Failed to execute 'postMessa ge' on 'MessagePort': An object could not be cloned. 21 PASS Sending host object has thrown DataCloneError: Failed to execute 'postMessa ge' on 'MessagePort': An object could not be cloned.
22 PASS Sending host object has thrown DataCloneError: Failed to execute 'postMessa ge' on 'MessagePort': An object could not be cloned. 22 PASS Sending host object has thrown DataCloneError: Failed to execute 'postMessa ge' on 'MessagePort': An object could not be cloned.
23 PASS Sending Function object has thrown DataCloneError: Failed to execute 'postM essage' on 'MessagePort': An object could not be cloned. 23 PASS Sending Function object has thrown DataCloneError: Failed to execute 'postM essage' on 'MessagePort': An object could not be cloned.
24 PASS Sending Error object has thrown DataCloneError: Failed to execute 'postMess age' on 'MessagePort': An object could not be cloned. 24 PASS Sending Error object has thrown DataCloneError: Failed to execute 'postMess age' on 'MessagePort': An object could not be cloned.
25 PASS send-port: transferred one port 25 PASS send-port: transferred one port
26 PASS send-port-twice: transferred one port twice 26 PASS send-port-twice: transferred one port twice
27 PASS send-two-ports: transferred two ports 27 PASS send-two-ports: transferred two ports
28 28
29 TEST COMPLETE 29 TEST COMPLETE
30 30
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/message-port-clone-expected.txt ('k') | LayoutTests/fast/events/resources/message-port-multi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698