JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hixie76 / alert-in-event-handler.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../../js-test-resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <div id="description"></div>
8 <div id="console"></div>
9 <script type="text/javascript">
10 description("Make sure event handler called serially.");
11
12 window.jsTestIsAsync = true;
13
14 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/send2");
15
16 ws.onopen = function()
17 {
18     debug("Connected");
19 };
20
21 ws.onmessage = function(messageEvent)
22 {
23     debug("Enter onmessage: " + messageEvent.data);
24     // alert() will suspend/resume WebSocket.
25     alert("message handled." + messageEvent.data);
26     debug("Leave onmessage: " + messageEvent.data);
27 };
28
29 ws.onclose = function()
30 {
31     debug("Closed");
32     finishJSTest();
33 };
34
35 debug("alert will suspend/resume WebSocket.");
36 alert("waiting for open");
37 debug("onopen should fire later.");
38 </script>
39 <script src="../../../../js-test-resources/js-test-post.js"></script>
40 </body>
41 </html>