summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/files/file-reader-abort-gc-iframe.html
blob: 3fba069617b17813cd3820df4241b3b96f7714b6 (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
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>
description("Verify that an aborted and stopping FileReader doesn't crash");

window.jsTestIsAsync = true;

if (window.testRunner)
    testRunner.dumpAsText();

var reader;
function setReader(r) {
    reader = r;
}

function runTest() {
    reader.readAsText(new Blob());
    reader.abort();
    document.body.removeChild(document.getElementById('ifr'));
    reader = null;
    gc();
    testPassed("No crash");
    finishJSTest();
}
</script>
<iframe id=ifr src="resources/file-reader-abort-gc-iframe.html"></iframe>