Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / websocket / handshake-fail-by-no-connection-header.html
blobd400ce3f8aec2282c34e5bf72cdb972c8c219112
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>
10 description("Test that WebSocket handshake fails if Connection header field isn't reflected by the server.");
12 window.jsTestIsAsync = true;
14 function endTest()
16 clearTimeout(timeoutID);
17 finishJSTest();
20 var url = "ws://localhost:8880/handshake-fail-by-no-connection-header";
21 var ws = new WebSocket(url);
23 ws.onopen = function()
25 testFailed("Unexpectedly Connected.");
28 ws.onmessage = function(messageEvent)
30 protocol = messageEvent.data;
31 ws.close();
34 ws.onclose = function()
36 endTest();
39 ws.onerror = function(errorEvent)
41 testPassed("onerror() was called");
44 function timeOutCallback()
46 debug("Timed out in state: " + ws.readyState);
47 endTest();
50 var timeoutID = setTimeout(timeOutCallback, 3000);
52 </script>
53 </body>
54 </html>