JS Test Harness: Remove successfullyParsed from more tests
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hybi / broken-utf8.html
1 <!DOCTYPE HTML>
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>
10 description("Test whether WebSocket aborts the connection when it receives a text frame containing broken UTF-8 data.");
11
12 window.jsTestIsAsync = true;
13 if (window.layoutTestController)
14     layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
15
16 var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hybi/broken-utf8");
17 var closeEvent;
18
19 ws.onopen = function()
20 {
21     debug("onopen() was called.");
22 };
23
24 ws.onmessage = function(event)
25 {
26     var message = event.data;
27     testFailed("onmessage() was called. (message = \"" + message + "\")");
28 };
29
30 ws.onclose = function(event)
31 {
32     debug("onclose() was called.");
33     closeEvent = event;
34     shouldBeFalse("closeEvent.wasClean");
35     finishJSTest();
36 };
37
38 </script>
39 <script src="../../../../js-test-resources/js-test-post.js"></script>
40 </body>
41 </html>