JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hybi / close-before-open.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("Test if Web Socket fires close event when WebSocket is opened and closed fore open event is received.");
11
12 window.jsTestIsAsync = true;
13 if (window.layoutTestController)
14     layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
15
16 var urls = [
17     "ws://127.0.0.1:8880/websocket/tests/hybi/echo",
18     "ws://127.0.0.1:8880/websocket/tests/hybi/close-code-and-reason"
19 ];
20
21 var testId = 0;
22
23 var test = function() {
24     if (0 != testId)
25         debug("closed on test " + testId);
26     if (2 == testId)
27         finishJSTest();
28     else {
29         ws = new WebSocket(urls[testId++]);
30         ws.onclose = test;
31         ws.close();
32     }
33 };
34
35 test();
36
37 </script>
38 <script src="../../../../js-test-resources/js-test-post.js"></script>
39 </body>
40 </html>