Index: LayoutTests/http/tests/websocket/tests/hybi/resources/connect-error-by-no-websocket-server.js |
diff --git a/LayoutTests/http/tests/websocket/tests/hybi/resources/connect-error-by-no-websocket-server.js b/LayoutTests/http/tests/websocket/tests/hybi/resources/connect-error-by-no-websocket-server.js |
deleted file mode 100644 |
index 4a105955a0cd393d5916a79fd34cbcf8e44734a9..0000000000000000000000000000000000000000 |
--- a/LayoutTests/http/tests/websocket/tests/hybi/resources/connect-error-by-no-websocket-server.js |
+++ /dev/null |
@@ -1,65 +0,0 @@ |
-// Worker tests need to set this for themselves in the .html file. |
-if (typeof window !== 'undefined') |
- window.jsTestIsAsync = true; |
- |
-var timeoutID = null; |
- |
-function endTest() |
-{ |
- clearTimeout(timeoutID); |
- finishJSTest(); |
-} |
- |
-// There must be no TCP/IP server listening on port |port|. |
-// If |closeOnError| is true, then the WebSocket close method will be called |
-// from the onerror handler. |
-// if |closeOnClose| is true, then the WebSocket close method will be called |
-// from the onclose handler. |
-function doTest(port, closeOnError, closeOnClose) |
-{ |
- debug("Test start (Port " + port + ")"); |
- |
- var url = "ws://127.0.0.1:" + port + "/" |
- |
- var ws = new WebSocket(url); |
- |
- ws.onopen = function() |
- { |
- testFailed("Connected"); |
- endTest(); |
- }; |
- |
- ws.onmessage = function(messageEvent) |
- { |
- testFailed("Received Message"); |
- ws.close(); |
- endTest(); |
- }; |
- |
- ws.onclose = function() |
- { |
- testPassed("onclose was called"); |
- if (closeOnClose) { |
- ws.close(); |
- } |
- endTest(); |
- } |
- |
- ws.onerror = function() |
- { |
- testPassed("onerror was called"); |
- if (closeOnError) { |
- ws.close(); |
- } |
- }; |
- |
- // Each failure to connect to 127.0.0.1 takes 1 second on Windows. |
- // Allow 2 seconds for padding. |
- timeoutID = setTimeout(timeOutCallback, 2000); |
-} |
- |
-function timeOutCallback() |
-{ |
- debug("Timed out..."); |
- endTest(); |
-} |