OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title> postMessage with duplicate transfer objects raises DataCloneError except
ion </title> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 </head> |
| 8 <body> |
| 9 <div id=log></div> |
| 10 |
| 11 <div style="display:none"> |
| 12 <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPos
tMessage.htm"></iframe> |
| 13 </div> |
| 14 |
| 15 <script> |
| 16 |
| 17 |
| 18 var description = "Test Description: " + |
| 19 "postMessage with duplicate transfer objects raises DataCl
oneError exception."; |
| 20 |
| 21 var DATA = "ports"; |
| 22 var TARGET = document.querySelector("iframe"); |
| 23 |
| 24 function PostMessageTest() |
| 25 { |
| 26 test(function() |
| 27 { |
| 28 assert_throws("DATA_CLONE_ERR", function() |
| 29 { |
| 30 assert_own_property(window, "MessageChannel", "window"); |
| 31 var channel = new MessageChannel(); |
| 32 TARGET.contentWindow.postMessage(DATA, "*", [channel.port1, chan
nel.port1]); |
| 33 }); |
| 34 }, description); |
| 35 } |
| 36 </script> |
| 37 </body> |
| 38 </html> |
OLD | NEW |