blob: 1e10ddf4b2e93e8e6810255d4d14a5b34a7cdf51 [file] [log] [blame]
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Fetch in worker: ensuring that no crash happens</title>
</head>
<body>
<p id="log">PASS if no crash... </p>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var numTerminated = 0;
var numWorker = 50;
for (var cptr = 0; cptr < numWorker; ++cptr) {
let worker = new Worker('fetch-worker-crash.js');
worker.onmessage = (event) => {
if (event.data == "starting")
worker.terminate();
if (++numTerminated == numWorker) {
document.getElementById('log').innerHTML += "DONE";
if (window.testRunner)
testRunner.notifyDone();
}
}
}
</script>
</body>
</html>