blob: 161d39bd9ce3db0e979aeb1087e7c38899669c0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<!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>
|