blob: 6db66406567a016bf2a59dda2942cc762ad96592 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<title>crash when closing a MessagePort with messages queued for dispatch</title>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
var resolve_done;
let done_promise = new Promise(resolve => resolve_done = resolve);
function done() {
// This test creates an iframe with a SharedWorker that does multiple
// postMessages back to the iframe. Once a message is received, the
// iframe is removed. The test passes if it does not crash
promise_test(t => {
const frame = document.createElement('iframe');
frame.src = 'resources/close-context-messageport-crash-iframe.html';
return done_promise;
}, 'closing a MessagePort with messages queued for dispatch should not crash');