Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: LayoutTests/http/tests/websocket/tests/hybi/resources/connect-error-by-no-websocket-server.js

Issue 101143002: Remove hybi sub directory for WebSocket layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
-}

Powered by Google App Engine
This is Rietveld 408576698