2011-07-05 Yuta Kitamura <yutak@chromium.org>
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hixie76 / workers / close-in-onmessage-crash.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head></head>
4 <body>
5 <p>Nested creation of two WebSockets should not cause a crash.</p>
6 <p></p>
7 <p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
8 <pre id=log>
9 </pre>
10 <script>
11 if (window.layoutTestController) {
12     layoutTestController.dumpAsText();
13     layoutTestController.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.layoutTestController)
25         layoutTestController.notifyDone();
26 }
27 var worker = new Worker('resources/close-in-onmessage-crash.js');
28 worker.onmessage = function (evt) {
29     log(evt.data);
30     if (evt.data == "DONE")
31         endTest();
32 };
33 </script>
34 </body>
35 </html>