gecko-dev/dom/datastore/tests/file_worker_close.html
Andrea Marchesini 8e36934a09 Bug 1057994 - DataStore should not dispatch runnables in a worker when it is shutting down, r=bent
--HG--
rename : dom/datastore/tests/file_basic_worker.html => dom/datastore/tests/file_worker_close.html
rename : dom/datastore/tests/test_basic_worker.html => dom/datastore/tests/test_worker_close.html
2014-12-17 14:49:36 +00:00

30 lines
567 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test for DataStore</title>
</head>
<body>
<div id="container"></div>
<script type="application/javascript;version=1.7">
var messages = [];
var worker = new Worker("file_worker_close.js");
worker.onmessage = function(event) {
messages.push(event.data)
if (event.data == 'DONE') {
worker.terminate();
// Fire message to the test_basic_worker.html.
for (var i = 0; i < messages.length; i++) {
alert(messages[i]);
}
}
}
</script>
</body>
</html>