Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / test / data / workers / worker_close.html
blobbf52b4c30ed07ee0cf3be6efdf6481771c07e3c6
1 <html>
2 <head>
3 <script src="worker_utils.js"></script>
4 </head>
5 <body>
6 <div id=result></div>
7 <script>
8 function log(message)
10 document.getElementById("result").innerHTML += message + "<br>";
13 var worker = new Worker("worker_common.js");
14 worker.postMessage("ping");
15 worker.onmessage = workerStarted;
17 var sharedWorker;
18 function workerStarted(event) {
19 log ("worker created");
20 worker.postMessage("close");
21 sharedWorker = new SharedWorker("worker_common.js");
22 sharedWorker.port.postMessage("ping");
23 sharedWorker.port.onmessage = sharedWorkerStarted;
26 function sharedWorkerStarted(event) {
27 log ("shared worker created");
28 sharedWorker.port.postMessage("close");
29 onSuccess();
31 </script>
33 </body>
34 </html>