Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / websocket / handshake-fail-by-more-protocol-header.html
blobf8361557973b98c9c3fdb7d34e53c9d45d5d8f0d
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 there are more than one Sec-WebSocket-Protocol header field in the response.");
12 window.jsTestIsAsync = true;
14 function endTest()
16 clearTimeout(timeoutID);
17 finishJSTest();
20 var url = "ws://localhost:8880/handshake-fail-by-more-protocol-header";
21 var ws = new WebSocket(url, "MatchProtocol");
23 ws.onopen = function()
25 testFailed("Unexpectedly Connected.");
28 ws.onmessage = function(messageEvent)
30 testFailed("Unexpectedly Received: '" + messageEvent.data + "'");
33 ws.onclose = function()
35 endTest();
38 ws.onerror = function(errorEvent)
40 testPassed("onerror() was called");
43 function timeOutCallback()
45 debug("Timed out in state: " + ws.readyState);
46 endTest();
49 var timeoutID = setTimeout(timeOutCallback, 3000);
51 </script>
52 </body>
53 </html>