| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
| 2 <html> | |
| 3 <head></head> | |
| 4 <body> | |
| 5 <p>Test for WebSocket in SharedWorker.</p> | |
| 6 <p></p> | |
| 7 <p>On success, you will see a series of "PASS" messages, followed by "TEST COMPL
ETE".</p> | |
| 8 <pre id=log> | |
| 9 </pre> | |
| 10 <script> | |
| 11 if (window.testRunner) { | |
| 12 testRunner.dumpAsText(); | |
| 13 testRunner.waitUntilDone(); | |
| 14 } | |
| 15 | |
| 16 function log(message) | |
| 17 { | |
| 18 document.getElementById("log").innerHTML += message + "\n"; | |
| 19 } | |
| 20 | |
| 21 function endTest() | |
| 22 { | |
| 23 log("TEST COMPLETE"); | |
| 24 if (window.testRunner) | |
| 25 testRunner.notifyDone(); | |
| 26 } | |
| 27 var worker = new SharedWorker('resources/worker-simple.js', 'websocketSimple'); | |
| 28 worker.port.onmessage = function (evt) { | |
| 29 log(evt.data); | |
| 30 if (evt.data == "DONE") | |
| 31 endTest(); | |
| 32 }; | |
| 33 </script> | |
| 34 </body> | |
| 35 </html> | |
| OLD | NEW |