Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / websocket / handshake-error.html
blob05706d26c75345d17c0dac60629ac2d2fa2fa2d7
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="/js-test-resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="description"></div>
8 <div id="console"></div>
9 <script type="text/javascript">
10 description("Handshake error test");
12 window.jsTestIsAsync = true;
14 function endTest()
16 clearTimeout(timeoutID);
17 finishJSTest();
20 var ws = new WebSocket("ws://127.0.0.1:8880/handshake-error");
22 ws.onopen = function()
24 testFailed("Unexpectedly Connected.");
27 ws.onmessage = function(messageEvent)
29 testFailed("Unexpectedly Received: '" + messageEvent.data + "'");
32 ws.onclose = function()
34 debug("Closed.");
35 shouldBe("ws.readyState", "3")
36 endTest();
39 ws.onerror = function(errorEvent)
41 testPassed("onerror() was called");
44 function timeOutCallback()
46 testFailed("Timed out in state: " + ws.readyState);
47 endTest();
50 var timeoutID = setTimeout(timeOutCallback, 3000);
52 </script>
53 </body>
54 </html>