1<!DOCTYPE html> 2<meta charset=utf-8> 3<script src="/resources/testharness.js"></script> 4<script src="/resources/testharnessreport.js"></script> 5<script> 6 7async_test(t => { 8 function workerCode() { 9 close(); 10 var blob = new Blob([123]); 11 var fr = new FileReader(); 12 fr.readAsText(blob); 13 fr.abort() 14 fr.readAsArrayBuffer(blob); 15 postMessage(true); 16 } 17 18 var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"}); 19 20 var w = new Worker(URL.createObjectURL(workerBlob)); 21 w.onmessage = function(e) { 22 assert_true(e.data, "FileReader created during worker shutdown."); 23 t.done(); 24 } 25}, 'FileReader created after a worker self.close()'); 26 27</script> 28