blob: 161d39bd9ce3db0e979aeb1087e7c38899669c0d [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// This is a regression test for crbug.com/860063.
window.controller = new AbortController();
async_test(t => {
onmessage = t.step_func(event => {
assert_equals(event.data, 'started');
const iframe = document.querySelector('iframe');
document.body.removeChild(iframe);
controller.abort();
t.done();
});
}, 'aborting a fetch in a destroyed context should not crash');
</script>
<iframe srcdoc="
<!DOCTYPE html>
<meta charset=utf-8>
<script>
fetch('../resources/infinite-slow-response.py', { signal: parent.controller.signal }).then(() => {
parent.postMessage('started', '*');
});
</script>
">
</iframe>