OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title> postMessage with Document object </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 Document object: Throw a DataCloneError
if message could not be cloned."; |
| 20 |
| 21 var DATA = document; |
| 22 var TARGET = document.querySelector("iframe"); |
| 23 |
| 24 function PostMessageTest() |
| 25 { |
| 26 test(function() |
| 27 { |
| 28 assert_throws("DATA_CLONE_ERR", function() |
| 29 { |
| 30 TARGET.contentWindow.postMessage(DATA, "*"); |
| 31 }); |
| 32 }, description); |
| 33 } |
| 34 </script> |
| 35 </body> |
| 36 </html> |
OLD | NEW |