| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> |
| 3 <title>crash when closing a MessagePort with messages queued for dispatch</title
> |
| 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 <body> |
| 7 </body> |
| 8 <script> |
| 9 var resolve_done; |
| 10 let done_promise = new Promise(resolve => resolve_done = resolve); |
| 11 |
| 12 function done() { |
| 13 document.querySelector('iframe').remove(); |
| 14 resolve_done(); |
| 15 } |
| 16 |
| 17 // This test creates an iframe with a SharedWorker that does multiple |
| 18 // postMessages back to the iframe. Once a message is received, the |
| 19 // iframe is removed. The test passes if it does not crash |
| 20 // https://crbug.com/649616. |
| 21 promise_test(t => { |
| 22 const frame = document.createElement('iframe'); |
| 23 frame.src = 'resources/close-context-messageport-crash-iframe.html'; |
| 24 document.body.appendChild(frame); |
| 25 return done_promise; |
| 26 }, 'closing a MessagePort with messages queued for dispatch should not crash'); |
| 27 </script> |
| OLD | NEW |