blob: 11e14f179025fc1530f6175e2bfa702b90727ff0 [file] [log] [blame]
<head>
<p>Test that multipe workers can be spawned simultaneously.
Should print "DONE" when done.</p>
<div id=result></div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function log(message)
{
document.getElementById("result").innerHTML += message + "<br>";
}
totalWorkers = 30;
replies = 0;
for (var i = 0; i < totalWorkers; i++) {
var worker = new Worker('resources/worker-init.js');
worker.onmessage = function(evt) {
log(evt.data);
if (++replies < totalWorkers)
return;
log("DONE");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
}
</script>
</body>