OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 description("Verify that an aborted and stopping FileReader doesn't crash"); | 4 description("Verify that an aborted and stopping FileReader doesn't crash"); |
5 | 5 |
6 window.jsTestIsAsync = true; | 6 window.jsTestIsAsync = true; |
7 | 7 |
8 if (window.testRunner) | 8 if (window.testRunner) |
9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
10 | 10 |
11 var reader; | 11 var reader; |
12 function setReader(r) { | 12 function setReader(r) { |
13 reader = r; | 13 reader = r; |
14 } | 14 } |
15 | 15 |
16 function runTest() { | 16 function runTest() { |
17 reader.readAsText(new Blob()); | 17 reader.readAsText(new Blob()); |
18 reader.abort(); | 18 reader.abort(); |
19 document.body.removeChild(document.getElementById('ifr')); | 19 document.body.removeChild(document.getElementById('ifr')); |
20 reader = null; | 20 reader = null; |
21 gc(); | 21 gc(); |
22 testPassed("No crash"); | 22 testPassed("No crash"); |
23 finishJSTest(); | 23 finishJSTest(); |
24 } | 24 } |
25 </script> | 25 </script> |
26 <iframe id=ifr src="resources/file-reader-abort-gc-iframe.html"></iframe> | 26 <iframe id=ifr src="resources/file-reader-abort-gc-iframe.html"></iframe> |
OLD | NEW |