4 <script src="../../../../js-test-resources/js-test-pre.js"></script>
7 <div id="description"></div>
8 <div id="console"></div>
10 description("Test that WebSocket handshake fails if Connection header field isn't reflected by the server.");
12 window.jsTestIsAsync = true;
16 clearTimeout(timeoutID);
20 var url = "ws://localhost:8880/websocket/tests/hixie76/handshake-fail-by-no-connection-header";
21 var ws = new WebSocket(url);
23 ws.onopen = function()
25 debug("FAIL: Connected");
28 ws.onmessage = function(messageEvent)
30 protocol = messageEvent.data;
34 ws.onclose = function()
39 function timeOutCallback()
41 debug("Timed out in state: " + ws.readyState);
45 var timeoutID = setTimeout(timeOutCallback, 3000);
48 <script src="../../../../js-test-resources/js-test-post.js"></script>