Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / websocket / handshake-fail-by-404.html
blobfc606e84687e69b6a6ad928eb48e29a4f3207324
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('Connection should fail immediately if the server returns a 404 error.');
12 window.jsTestIsAsync = true;
14 var url = 'ws://localhost:8880/handshake-fail-by-404';
15 var ws = new WebSocket(url);
17 var wasClean = null;
19 ws.onopen = function()
21 testFailed('onopen called');
22 ws.close();
25 ws.onclose = function(event)
27 wasClean = event.wasClean;
28 shouldBeFalse('wasClean');
29 finishJSTest();
32 ws.onerror = function(errorEvent)
34 testPassed("onerror() was called");
37 </script>
38 </body>
39 </html>