Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / websocket / handshake-fail-by-null-subprotocol-selection.html
blob37360f2226cc8016322b648b299969d4fb226da9
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 for verifying that the WebSocket handshake fails when the client requests a subprotocol but the server doesn't include a Sec-WebSocket-Protocol header in the response.");
12 window.jsTestIsAsync = true;
14 var url = "ws://localhost:8880/handshake-fail-by-null-subprotocol-selection";
15 var ws = new WebSocket(url, 'test');
16 var closeEvent;
18 ws.onopen = function()
20 testFailed("Connection established.");
21 ws.close();
24 ws.onclose = function(event)
26 closeEvent = event;
27 shouldBeFalse("closeEvent.wasClean");
28 finishJSTest();
31 ws.onerror = function(errorEvent)
33 testPassed("onerror() was called");
36 </script>
37 </body>
38 </html>