WebSocket: Remove hixie76 protocol implementation
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2012 07:31:02 +0000 (07:31 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2012 07:31:02 +0000 (07:31 +0000)
https://bugs.webkit.org/show_bug.cgi?id=88620

Patch by Yuta Kitamura <yutak@chromium.org> on 2012-07-10
Reviewed by Adam Barth.

Source/WebCore:

This change removes code that implements the old hixie-76 WebSocket protocol which
isn't used anymore.

No new tests are added, because the code using the current protocol should not be
affected. Tests for hixie-76 protocol are skipped (these tests will be removed
eventually).

* Modules/websockets/ThreadableWebSocketChannel.h:
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
(WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
(ThreadableWebSocketChannelClientWrapper):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::WebSocket):
(WebCore::WebSocket::connect):
(WebCore::WebSocket::send):
(WebCore::WebSocket::protocol):
(WebCore::WebSocket::extensions):
(WebCore::WebSocket::binaryType):
(WebCore::WebSocket::setBinaryType):
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didClose):
(WebCore::WebSocket::getFramingOverhead):
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::connect):
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::fail):
(WebCore::WebSocketChannel::didCloseSocketStream):
(WebCore::WebSocketChannel::processBuffer):
(WebCore::WebSocketChannel::startClosingHandshake):
(WebCore::WebSocketChannel::enqueueTextFrame):
(WebCore::WebSocketChannel::enqueueRawFrame):
(WebCore::WebSocketChannel::enqueueBlobFrame):
(WebCore::WebSocketChannel::processOutgoingFrameQueue):
(WebCore::WebSocketChannel::abortOutgoingFrameQueue):
* Modules/websockets/WebSocketChannel.h:
(WebSocketChannel):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::WebSocketHandshake):
(WebCore::WebSocketHandshake::clientHandshakeMessage):
(WebCore::WebSocketHandshake::clientHandshakeRequest):
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::checkResponseHeaders):
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create):
(WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask):
(WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
(WorkerThreadableWebSocketChannel):
(Peer):
(Bridge):

LayoutTests:

Skip tests under hixie76 directory in all ports, because hixie-76 protocol support is
being dropped. These tests will be removed later.

* platform/chromium/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/Skipped:
* platform/wk2/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122199 268f45cc-cd09-0410-ab3c-d52691b4dbfc

179 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/websocket/tests/hixie76/alert-in-event-handler-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/alert-in-event-handler.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-control-chars-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-control-chars.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-empty-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-empty.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-non-ascii-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-non-ascii.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bufferedAmount-after-close-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/bufferedAmount-after-close.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/client-close-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/client-close.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/client-close_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-before-open-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-before-open.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-event-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-event.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-navigate-new-location-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-navigate-new-location.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-and-force-gc-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-and-force-gc.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-reference-in-parent-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-reference-in-parent.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/cross-origin-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/cross-origin.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/echo-challenge_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/echo-cookie_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/echo-location_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/echo_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/error-detect-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/error-detect.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/fixed-origin_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-lengths-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/frame-lengths.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-challenge-randomness-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-challenge-randomness.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-error-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-error.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-error_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-cross-origin-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-cross-origin.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-sub-protocol-mismatch-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-sub-protocol-mismatch.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/httponly-cookie-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/httponly-cookie.pl [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/multiple-connections-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/multiple-connections.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/no-query_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/null-character-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/null-character.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/origin-test_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/protocol-test_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/reload-crash-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/reload-crash.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/resources/close-on-unload-iframe-reference-in-parent.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/resources/close-on-unload-iframe.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/resources/reload-crash-iframe.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-after-close-on-unload-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-after-close-on-unload.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-empty-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-empty.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-object-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-object.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-throw-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send-throw.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send2_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/send_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/server-close-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/server-close.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/server-close_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/simple-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/simple-stress-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/simple-stress.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/simple.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/simple_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-with-space-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-with-space.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/undefined-attributes-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/undefined-attributes.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/unicode-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/unicode.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/unicode_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/unknown-frame-type_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-attribute-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-attribute.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-no-trailing-slash-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-no-trailing-slash.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-parsing-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-parsing.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-with-credential-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-with-credential.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-with-empty-query-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-with-empty-query.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-for-no-query-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-for-no-query.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/url-with-query.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/websocket-event-target-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/websocket-event-target.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/websocket-pending-activity-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/websocket-pending-activity.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/websocket-protocol-ignored-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/websocket-protocol-ignored.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-onmessage-crash-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-onmessage-crash.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-shared-worker-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-shared-worker.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-worker-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-worker.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/close-in-onmessage-crash.js [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/close-in-worker.js [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/echo-challenge_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/echo_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/simple_wsh.py [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/worker-handshake-challenge-randomness.js [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/worker-simple.js [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/shared-worker-simple-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/shared-worker-simple.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-handshake-challenge-randomness-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-handshake-challenge-randomness.html [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-simple-expected.txt [deleted file]
LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-simple.html [deleted file]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/win/Skipped
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h
Source/WebCore/Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp
Source/WebCore/Modules/websockets/ThreadableWebSocketChannelClientWrapper.h
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/Modules/websockets/WebSocket.h
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.h
Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
Source/WebCore/Modules/websockets/WebSocketHandshake.h
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h

index 06483bd..b67f665 100644 (file)
@@ -1,3 +1,20 @@
+2012-07-10  Yuta Kitamura  <yutak@chromium.org>
+
+        WebSocket: Remove hixie76 protocol implementation
+        https://bugs.webkit.org/show_bug.cgi?id=88620
+
+        Reviewed by Adam Barth.
+
+        Skip tests under hixie76 directory in all ports, because hixie-76 protocol support is
+        being dropped. These tests will be removed later.
+
+        * platform/chromium/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/win/Skipped:
+        * platform/wk2/Skipped:
+
 2012-07-09  Kent Tamura  <tkent@chromium.org>
 
         REGRESSION(r114862-r114886): Fix a crash by switching the input type to hidden.
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/alert-in-event-handler-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/alert-in-event-handler-expected.txt
deleted file mode 100644 (file)
index 5157ec0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-ALERT: waiting for open
-ALERT: message handled.first message
-ALERT: message handled.second message
-Make sure event handler called serially.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-alert will suspend/resume WebSocket.
-onopen should fire later.
-Connected
-Enter onmessage: first message
-Leave onmessage: first message
-Enter onmessage: second message
-Leave onmessage: second message
-Closed
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/alert-in-event-handler.html b/LayoutTests/http/tests/websocket/tests/hixie76/alert-in-event-handler.html
deleted file mode 100644 (file)
index fc3409c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure event handler called serially.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/send2");
-
-ws.onopen = function()
-{
-    debug("Connected");
-};
-
-ws.onmessage = function(messageEvent)
-{
-    debug("Enter onmessage: " + messageEvent.data);
-    // alert() will suspend/resume WebSocket.
-    alert("message handled." + messageEvent.data);
-    debug("Leave onmessage: " + messageEvent.data);
-};
-
-ws.onclose = function()
-{
-    debug("Closed");
-    finishJSTest();
-};
-
-debug("alert will suspend/resume WebSocket.");
-alert("waiting for open");
-debug("onopen should fire later.");
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash-expected.txt
deleted file mode 100644 (file)
index e04eed9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CONSOLE MESSAGE: Invalid UTF-8 sequence in header name
-Make sure WebSocket doesn't crash with bad handshake message.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket is closed
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash.html b/LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash.html
deleted file mode 100644 (file)
index 1c25bbb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure WebSocket doesn't crash with bad handshake message.");
-
-window.jsTestIsAsync = true;
-
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/bad-handshake-crash");
-ws.onopen = function () {
-    debug("WebSocket is open");
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/bad-handshake-crash_wsh.py
deleted file mode 100644 (file)
index e3e96ef..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    msg = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
-    msg += "Upgrade: WebSocket\r\n"
-    msg += "Connection: Upgrade\r\n"
-    msg += "Sec-WebSocket-Location: " + request.ws_location + "\r\n"
-    msg += "Sec-WebSocket-Origin: " + request.ws_origin + "\r\n"
-    msg += "\xa5:\r\n"
-    msg += "\r\n"
-    msg += request.ws_challenge_md5
-    request.connection.write(msg)
-    print msg
-    raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message.
-
-
-def web_socket_transfer_data(request):
-    pass
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-control-chars-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-control-chars-expected.txt
deleted file mode 100644 (file)
index 36a3065..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\u0000'
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\u0009'
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\u001B'
-Test WebSocket bad sub-protocol names by control characters.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "\0") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "     ") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "
-") threw exception SyntaxError: Unexpected EOF.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "
-") threw exception SyntaxError: Unexpected EOF.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "\e") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-control-chars.html b/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-control-chars.html
deleted file mode 100644 (file)
index f50b6ba..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket bad sub-protocol names by control characters.");
-
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-// Fails if protocol contains an character less than U+0020.
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0000")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0009")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u000A")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u000D")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u001B")');
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-empty-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-empty-expected.txt
deleted file mode 100644 (file)
index bd249bd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CONSOLE MESSAGE: Wrong protocol for WebSocket ''
-Test WebSocket bad sub-protocol names (empty).
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-empty.html b/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-empty.html
deleted file mode 100644 (file)
index a2ca2b3..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket bad sub-protocol names (empty).");
-
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-// Fails if protocol is an empty string.
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "")');
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-non-ascii-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-non-ascii-expected.txt
deleted file mode 100644 (file)
index 18b3683..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\u007F'
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\u0080'
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\u3042'
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\uFFFF'
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\uFEFF'
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\uFFFE'
-CONSOLE MESSAGE: Wrong protocol for WebSocket '\uD840\uDC0B'
-Test WebSocket bad sub-protocol names by non-ASCII chars.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "\7f") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "\80") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "あ") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "￿") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "￾") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:8880/simple", "𠀋") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-non-ascii.html b/LayoutTests/http/tests/websocket/tests/hixie76/bad-sub-protocol-non-ascii.html
deleted file mode 100644 (file)
index ff227a2..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket bad sub-protocol names by non-ASCII chars.");
-
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-// Fails if protocol contains an character greater than U+007E.
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u007F")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u0080")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\u3042")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFFFF")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFEFF")');
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uFFFE")');
-// Surrogate pairs
-shouldThrow('new WebSocket("ws://127.0.0.1:8880/simple", "\uD840\uDC0B")');
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bufferedAmount-after-close-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/bufferedAmount-after-close-expected.txt
deleted file mode 100644 (file)
index 91b4ec7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Web Socket bufferedAmount after closed
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected.
-Closed.
-PASS ws.readyState is 3
-PASS ws.bufferedAmount is 0
-PASS ws.send('send to closed socket') is false
-PASS ws.bufferedAmount is 23
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/bufferedAmount-after-close.html b/LayoutTests/http/tests/websocket/tests/hixie76/bufferedAmount-after-close.html
deleted file mode 100644 (file)
index 5fbb61f..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Web Socket bufferedAmount after closed");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://localhost:8880/websocket/tests/hixie76/simple");
-
-ws.onopen = function()
-{
-    debug("Connected.");
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    debug("Closed.");
-    shouldBe("ws.readyState", "3");
-    shouldBe("ws.bufferedAmount", "0");
-    shouldBeFalse("ws.send('send to closed socket')");
-    // If the connection is closed, bufferedAmount attribute's value will only
-    // increase with each call to the send() method.
-    // (the number does not reset to zero once the connection closes).
-    shouldBe("ws.bufferedAmount", "23");
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/client-close-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/client-close-expected.txt
deleted file mode 100644 (file)
index 2668fd9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-WebSocket: Test client-initiated close.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected
-Received: close_frame='\xff\x00'
-Closed
-PASS receivedMessage is "close_frame='\\xff\\x00'"
-PASS closeEvent.wasClean is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/client-close.html b/LayoutTests/http/tests/websocket/tests/hixie76/client-close.html
deleted file mode 100644 (file)
index 0f13b83..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("WebSocket: Test client-initiated close.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/client-close");
-var closeEvent;
-var receivedMessage;
-
-ws.onopen = function()
-{
-    debug("Connected");
-    ws.close();
-};
-
-ws.onmessage = function(messageEvent)
-{
-    debug("Received: " + messageEvent.data);
-    receivedMessage = messageEvent.data;
-};
-
-ws.onclose = function(event)
-{
-    debug("Closed");
-    closeEvent = event;
-    shouldBeEqualToString("receivedMessage", "close_frame='\\xff\\x00'");
-    shouldBeTrue("closeEvent.wasClean");
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/client-close_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/client-close_wsh.py
deleted file mode 100644 (file)
index 7ed28bf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    # Wait for a close frame sent from the client.
-    close_frame = request.ws_stream.receive_bytes(2)
-
-    # Tell the client what we have received.
-    msgutil.send_message(request, 'close_frame=%r' % close_frame)
-
-    # If the following assertion fails, AssertionError will be raised,
-    # which will prevent pywebsocket from sending a close frame.
-    # In this case, the client will fail to finish closing handshake, thus
-    # closeEvent.wasClean will become false.
-    assert close_frame == '\xff\x00'
-
-    # Pretend we have received a close frame from the client.
-    # After this function exits, pywebsocket will send a close frame automatically.
-    request.client_terminated = True
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-before-open-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/close-before-open-expected.txt
deleted file mode 100644 (file)
index 92890f2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CONSOLE MESSAGE: WebSocket is closed before the connection is established.
-Test if Web Socket fires close event when WebSocket is opened and closed fore open event is received.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-closed
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-before-open.html b/LayoutTests/http/tests/websocket/tests/hixie76/close-before-open.html
deleted file mode 100644 (file)
index 3111d09..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test if Web Socket fires close event when WebSocket is opened and closed fore open event is received.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-ws.onclose = function() {
-    debug("closed");
-    finishJSTest();
-};
-ws.close();
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-event-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/close-event-expected.txt
deleted file mode 100644 (file)
index a605cc9..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Make sure WebSocket fires CloseEvent when closed.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket is open
-Received: 'Hello from Simple WSH.'
-Closed
-PASS closeEventType is "close"
-PASS 'wasClean' in closeEvent is true
-PASS closeEvent.wasClean is true
-PASS Object.getPrototypeOf(closeEvent) === CloseEvent.prototype is true
-PASS Object.getPrototypeOf(closeEvent) !== Event.prototype is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-event.html b/LayoutTests/http/tests/websocket/tests/hixie76/close-event.html
deleted file mode 100644 (file)
index fc08e38..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure WebSocket fires CloseEvent when closed.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/simple");
-
-ws.onopen = function()
-{
-    debug("WebSocket is open");
-};
-
-ws.onmessage = function(messageEvent)
-{
-    debug("Received: '" + messageEvent.data + "'");
-};
-
-var closeEvent;
-var closeEventType;
-ws.onclose = function(event)
-{
-    debug("Closed");
-    closeEvent = event;
-    closeEventType = closeEvent.type;
-    shouldBe("closeEventType", '"close"')
-    shouldBeTrue("'wasClean' in closeEvent");
-    shouldBeTrue("closeEvent.wasClean");
-    shouldBeTrue("Object.getPrototypeOf(closeEvent) === CloseEvent.prototype");
-    shouldBeTrue("Object.getPrototypeOf(closeEvent) !== Event.prototype");
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-navigate-new-location-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-navigate-new-location-expected.txt
deleted file mode 100644 (file)
index 176427e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Test if Web Socket is closed when navigating to new location.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS ws on master document is ready.
-PASS insert a iframe, where open ws called 'socket1'
-PASS 'socket1' is sent to the server. navigate to new location. expect receiving 'socket1' on ws...
-PASS closedSocket is "socket1"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-navigate-new-location.html b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-navigate-new-location.html
deleted file mode 100644 (file)
index 7d4c303..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test if Web Socket is closed when navigating to new location.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var frameDiv;
-var closedSocket;
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/close-on-unload");
-ws.onopen = function()
-{
-    debug("PASS ws on master document is ready.");
-    frameDiv = document.createElement("iframe");
-    frameDiv.src = "resources/close-on-unload-iframe.html";
-    document.body.appendChild(frameDiv);
-    debug("PASS insert a iframe, where open ws called 'socket1'");
-};
-ws.onmessage = function(evt)
-{
-    closedSocket = evt.data;
-    ws.close();
-};
-ws.onclose = function()
-{
-    shouldBe("closedSocket", '"socket1"');
-    finishJSTest();
-};
-
-document.iframeReady = function()
-{
-    debug("PASS 'socket1' is sent to the server. navigate to new location. expect receiving 'socket1' on ws...");
-    frameDiv.src = "handler_map.txt";
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-and-force-gc-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-and-force-gc-expected.txt
deleted file mode 100644 (file)
index 6a347a4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Test if Web Socket is closed on unload and not crashed if garbage collected
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS ws on master document is ready.
-PASS insert a iframe, where open ws called 'socket1'
-PASS 'socket1' is sent to the server. unload the iframe and force garbage collection. expect receiving 'socket1' on ws and no crash...
-PASS closedSocket is "socket1"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-and-force-gc.html b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-and-force-gc.html
deleted file mode 100644 (file)
index 624d94b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test if Web Socket is closed on unload and not crashed if garbage collected");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var frameDiv;
-var closedSocket;
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/close-on-unload");
-ws.onopen = function()
-{
-    debug("PASS ws on master document is ready.");
-    frameDiv = document.createElement("iframe");
-    frameDiv.src = "resources/close-on-unload-iframe.html";
-    document.body.appendChild(frameDiv);
-    debug("PASS insert a iframe, where open ws called 'socket1'");
-};
-ws.onmessage = function(evt)
-{
-    closedSocket = evt.data;
-    ws.close();
-};
-ws.onclose = function()
-{
-    shouldBe("closedSocket", '"socket1"');
-    finishJSTest();
-};
-
-document.iframeReady = function()
-{
-    debug("PASS 'socket1' is sent to the server. unload the iframe and force garbage collection. expect receiving 'socket1' on ws and no crash...");
-    document.body.removeChild(frameDiv);
-    gc();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-expected.txt
deleted file mode 100644 (file)
index cf45278..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Test if Web Socket is closed on unload
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS ws on master document is ready.
-PASS insert a iframe, where open ws called 'socket1'
-PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...
-PASS closedSocket is "socket1"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-reference-in-parent-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-reference-in-parent-expected.txt
deleted file mode 100644 (file)
index f91116d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Test if Web Socket opened in iframe but referred in parent document is closed on unloading the frame.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS ws on master document is ready.
-PASS insert a iframe, where open ws called 'socket1'
-PASS document.childWebSocket is non-null.
-PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...
-PASS closedSocket is "socket1"
-PASS document.childWebSocket.readyState is 3
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-reference-in-parent.html b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload-reference-in-parent.html
deleted file mode 100644 (file)
index 7fe5089..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test if Web Socket opened in iframe but referred in parent document is closed on unloading the frame.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var frameDiv;
-var closedSocket;
-document.childWebSocket = null;
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/close-on-unload");
-ws.onopen = function()
-{
-    debug("PASS ws on master document is ready.");
-    frameDiv = document.createElement("iframe");
-    frameDiv.src = "resources/close-on-unload-iframe-reference-in-parent.html";
-    document.body.appendChild(frameDiv);
-    debug("PASS insert a iframe, where open ws called 'socket1'");
-};
-ws.onmessage = function(evt)
-{
-    closedSocket = evt.data;
-    ws.close();
-};
-ws.onclose = function()
-{
-    shouldBe("closedSocket", '"socket1"');
-    shouldBe("document.childWebSocket.readyState", "3");
-    finishJSTest();
-};
-
-document.iframeReady = function()
-{
-    shouldBeNonNull("document.childWebSocket");
-    debug("PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...");
-    document.body.removeChild(frameDiv);
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload.html b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload.html
deleted file mode 100644 (file)
index 7b03469..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test if Web Socket is closed on unload");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var frameDiv;
-var closedSocket;
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/close-on-unload");
-ws.onopen = function()
-{
-    debug("PASS ws on master document is ready.");
-    frameDiv = document.createElement("iframe");
-    frameDiv.src = "resources/close-on-unload-iframe.html";
-    document.body.appendChild(frameDiv);
-    debug("PASS insert a iframe, where open ws called 'socket1'");
-};
-ws.onmessage = function(evt)
-{
-    closedSocket = evt.data;
-    ws.close();
-};
-ws.onclose = function()
-{
-    shouldBe("closedSocket", '"socket1"');
-    finishJSTest();
-};
-
-document.iframeReady = function()
-{
-    debug("PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...");
-    document.body.removeChild(frameDiv);
-}; 
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/close-on-unload_wsh.py
deleted file mode 100644 (file)
index 4c13115..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2009, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-# we don't use set() here, because python on mac tiger doesn't support it.
-connections = {}
-
-
-def web_socket_do_extra_handshake(request):
-    pass  # Always accept.
-
-
-def web_socket_transfer_data(request):
-    global connections
-    connections[request] = True
-    socketName = None
-    try:
-        socketName = msgutil.receive_message(request)
-        # notify to client that socketName is received by server.
-        msgutil.send_message(request, socketName)
-        msgutil.receive_message(request)  # wait, and exception by close.
-        socketName = socketName + ': receive next message'
-    finally:
-        # request is closed. notify this socketName to other web sockets.
-        del connections[request]
-        for ws in connections.keys():
-            msgutil.send_message(ws, socketName)
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket-expected.txt
deleted file mode 100644 (file)
index fc148b0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Test if Web Socket is closed while handshaking and unreferenced, it should fire close event at most once.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS 1 is >= countCloseEvent
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket.html b/LayoutTests/http/tests/websocket/tests/hixie76/close-unref-websocket.html
deleted file mode 100644 (file)
index 0ccf770..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test if Web Socket is closed while handshaking and unreferenced, it should fire close event at most once.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var countCloseEvent = 0;
-
-function endTest()
-{
-    shouldBeGreaterThanOrEqual("1", "countCloseEvent");
-    finishJSTest();
-};
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-ws.onclose = function() {
-    countCloseEvent += 1;
-};
-ws = null;
-gc();
-setTimeout("endTest()", 100);
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/cross-origin-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/cross-origin-expected.txt
deleted file mode 100644 (file)
index fa04b7b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Web Socket Cross Origin test
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-document.domain=127.0.0.1
-ws.url=ws://localhost:8880/websocket/tests/hixie76/origin-test
-Connected
-PASS origin is "http://127.0.0.1:8000"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/cross-origin.html b/LayoutTests/http/tests/websocket/tests/hixie76/cross-origin.html
deleted file mode 100644 (file)
index 3bec6ce..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Web Socket Cross Origin test");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var origin;
-
-function endTest()
-{
-    shouldBe("origin", '"http://127.0.0.1:8000"');
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = "ws://localhost:8880/websocket/tests/hixie76/origin-test";
-debug("document.domain=" + document.domain);
-debug("ws.url=" + url);
-var ws = new WebSocket(url);
-
-ws.onopen = function()
-{
-    debug("Connected");
-};
-
-ws.onmessage = function (messageEvent)
-{
-    origin = messageEvent.data;
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/echo-challenge_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/echo-challenge_wsh.py
deleted file mode 100644 (file)
index 390d441..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, _hexify(request.ws_challenge))
-
-
-def _hexify(bytes):
-    return ':'.join(['%02X' % ord(byte) for byte in bytes])
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/echo-cookie_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/echo-cookie_wsh.py
deleted file mode 100644 (file)
index faa25f9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request,  request.headers_in['Cookie'])
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/echo-location_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/echo-location_wsh.py
deleted file mode 100644 (file)
index 3390570..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    print request.ws_location
-    msgutil.send_message(request, request.ws_location)
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/echo_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/echo_wsh.py
deleted file mode 100644 (file)
index 79c3f10..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2009, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-_GOODBYE_MESSAGE = 'Goodbye'
-
-
-def web_socket_do_extra_handshake(request):
-    pass  # Always accept.
-
-
-def web_socket_transfer_data(request):
-    while True:
-        line = msgutil.receive_message(request)
-        msgutil.send_message(request, line)
-        if line == _GOODBYE_MESSAGE:
-            return
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/error-detect-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/error-detect-expected.txt
deleted file mode 100644 (file)
index 6c69eed..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Make sure WebSocket correctly fire error event for unknown frame type.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket is open
-received:done
-WebSocket is closed
-PASS errorCount is 255
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/error-detect.html b/LayoutTests/http/tests/websocket/tests/hixie76/error-detect.html
deleted file mode 100644 (file)
index 4aa12c7..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure WebSocket correctly fire error event for unknown frame type.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var errorCount = 0;
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/unknown-frame-type");
-ws.onopen = function () {
-    debug("WebSocket is open");
-};
-ws.onmessage = function (evt) {
-    debug("received:" + evt.data);
-};
-ws.onerror = function () {
-    errorCount += 1;
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    shouldBe("errorCount", "255");
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/fixed-origin_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/fixed-origin_wsh.py
deleted file mode 100644 (file)
index 938fb83..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    request.ws_origin = 'http://example.com'
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, request.ws_origin)
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer-expected.txt
deleted file mode 100644 (file)
index af37700..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Make sure WebSocket correctly skip lengthed frame even if received data has incomplete frame.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket is open
-received:hello
-WebSocket is closed
-1
-PASS areArraysEqual(received_messages, expected_messages) is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer.html b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer.html
deleted file mode 100644 (file)
index 854aa4b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure WebSocket correctly skip lengthed frame even if received data has incomplete frame.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var received_messages = [];
-var expected_messages = ["hello"];
-function finish() {
-    clearTimeout(timeoutID);
-    debug(received_messages.length);
-    for (var i = 0; i < received_messages; i++) {
-        debug("received[" + i + "]=" + received_messages[i]);
-    }
-
-    shouldBeTrue("areArraysEqual(received_messages, expected_messages)");
-
-    finishJSTest();
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/frame-length-longer-than-buffer");
-ws.onopen = function () {
-    debug("WebSocket is open");
-};
-ws.onmessage = function (evt) {
-    debug("received:" + evt.data);
-    received_messages.push(evt.data);
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    finish();
-};
-var timeoutID = setTimeout("finish()", 2000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-longer-than-buffer_wsh.py
deleted file mode 100644 (file)
index 2bd8937..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    msg = "\0hello\xff"
-    msg += "\x80\x81\x01" # Skip 1*128+1 bytes.
-    msg += "\x01\xff"
-    msg += "\0should be skipped\xff"
-    request.connection.write(msg)
-    raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from starting closing handshake.
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow-expected.txt
deleted file mode 100644 (file)
index efca336..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-CONSOLE MESSAGE: WebSocket frame length too large
-Make sure WebSocket does not crash and report error when it sees length overflow
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket is open
-WebSocket received error frame
-WebSocket is closed
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow.html b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow.html
deleted file mode 100644 (file)
index 9532b83..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description("Make sure WebSocket does not crash and report error when it sees length overflow");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/frame-length-overflow");
-ws.onopen = function () {
-    debug("WebSocket is open");
-};
-ws.onmessage = function (evt) {
-    debug("WebSocket received:" + evt.data);
-};
-ws.onerror = function () {
-    debug("WebSocket received error frame");
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-overflow_wsh.py
deleted file mode 100644 (file)
index f2abbb2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    msg = 16 * '\xff'
-    request.connection.write(msg)
-    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from starting closing handshake.
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip-expected.txt
deleted file mode 100644 (file)
index aa32fe4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Make sure WebSocket correctly skip lengthed frame.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket is open
-received:hello
-received:world
-WebSocket is closed
-2
-PASS areArraysEqual(received_messages, expected_messages) is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip.html b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip.html
deleted file mode 100644 (file)
index 90f1f90..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure WebSocket correctly skip lengthed frame.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var received_messages = [];
-var expected_messages = ["hello", "world"];
-function finish() {
-    clearTimeout(timeoutID);
-    debug(received_messages.length);
-    for (var i = 0; i < received_messages; i++) {
-        debug("received[" + i + "]=" + received_messages[i]);
-    }
-
-    shouldBeTrue("areArraysEqual(received_messages, expected_messages)");
-
-    finishJSTest();
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/frame-length-skip");
-ws.onopen = function () {
-    debug("WebSocket is open");
-};
-ws.onmessage = function (evt) {
-    debug("received:" + evt.data);
-    received_messages.push(evt.data);
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    finish();
-};
-var timeoutID = setTimeout("finish()", 2000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/frame-length-skip_wsh.py
deleted file mode 100644 (file)
index fe87401..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    msg = "\0hello\xff"
-    msg += "\x80\x81\x01"   # skip 1*128+1 bytes.
-    msg += "\x01"
-    msg += "\0should be skipped" + (" " * 109) + "\xff"
-    msg += "\0world\xff"
-    request.connection.write(msg)
-    print msg
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-lengths-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/frame-lengths-expected.txt
deleted file mode 100644 (file)
index 23ee459..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Test sending and receiving small messages of different lengths.
-
-Should say PASS:
-
-Running the test...
-PASS
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/frame-lengths.html b/LayoutTests/http/tests/websocket/tests/hixie76/frame-lengths.html
deleted file mode 100644 (file)
index 7c77861..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<p>Test sending and receiving small messages of different lengths.</p>
-<p>Should say PASS:</p>
-<pre id=log>Running the test...
-</pre>
-<script>
-var maxLength = 1025;
-
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-function log(message)
-{
-    document.getElementById("log").innerHTML += message + "\n";
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-
-var lastString;
-var failed = false;
-ws.onopen = function() {
-    lastString = "";
-    ws.send(lastString);
-}
-
-ws.onmessage = function(msg) {
-    if (msg.data != lastString) {
-        log("FAIL - incorrect response. Expected '" + lastString + "', got '" + msg.data + "'.");
-        failed = true;
-    }
-
-    if (lastString.length == maxLength) {
-        if (!failed)
-            log("PASS");
-        ws.send("Goodbye");
-        ws.onmessage = null;
-        if (window.layoutTestController)
-            setTimeout("layoutTestController.notifyDone()", 0);
-    } else {
-        lastString += "*";
-        ws.send(lastString);
-    }
-}
-</script>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-challenge-randomness-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-challenge-randomness-expected.txt
deleted file mode 100644 (file)
index c1bdcd7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Handshake request should contain random challenge values.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS challenge1 === challenge2 is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-challenge-randomness.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-challenge-randomness.html
deleted file mode 100644 (file)
index c3ce889..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description('Handshake request should contain random challenge values.');
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var challenge1;
-var challenge2;
-
-var url = 'ws://localhost:8880/websocket/tests/hixie76/echo-challenge';
-var ws1 = new WebSocket(url);
-
-ws1.onmessage = function(messageEvent)
-{
-    challenge1 = messageEvent.data;
-    ws1.close();
-}
-
-ws1.onclose = function()
-{
-    var ws2 = new WebSocket(url);
-
-    ws2.onmessage = function(messageEvent)
-    {
-        challenge2 = messageEvent.data;
-        ws2.close();
-    }
-
-    ws2.onclose = function()
-    {
-        shouldBeFalse('challenge1 === challenge2');
-        if (challenge1 === challenge2)
-            debug('challenge was ' + challenge1);
-        finishJSTest();
-    }
-}
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-error-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-error-expected.txt
deleted file mode 100644 (file)
index 57d324e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-CONSOLE MESSAGE: No response code found: ThisWillCauseHandshakeError
-Handshake error test
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Closed.
-PASS ws.readyState is 3
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-error.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-error.html
deleted file mode 100644 (file)
index 2b34f10..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Handshake error test");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/handshake-error");
-
-ws.onopen = function()
-{
-    testFailed("Unexpectedly Connected.");
-};
-
-ws.onmessage = function(messageEvent)
-{
-    testFailed("Unexpectedly Received: '" + messageEvent.data + "'");
-};
-
-ws.onclose = function()
-{
-    debug("Closed.");
-    shouldBe("ws.readyState", "3")
-    endTest();
-};
-
-function timeOutCallback()
-{
-    testFailed("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-error_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-error_wsh.py
deleted file mode 100644 (file)
index c851fa6..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    request.connection.write('ThisWillCauseHandshakeError\r\n')
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, 'Hello from Handshake Error WSH.')
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-cross-origin-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-cross-origin-expected.txt
deleted file mode 100644 (file)
index b8da7cb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-CONSOLE MESSAGE: Error during WebSocket handshake: origin mismatch: http://127.0.0.1:8000 != http://example.com
-Make sure Web Socket connection failed if origin mismatches.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-document.domain=127.0.0.1
-ws.url=ws://localhost:8880/websocket/tests/hixie76/fixed-origin
-PASS connected is false
-PASS origin is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-cross-origin.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-cross-origin.html
deleted file mode 100644 (file)
index 4d772f7..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure Web Socket connection failed if origin mismatches.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var connected = false;
-var origin;
-
-function endTest()
-{
-    shouldBeFalse("connected");
-    shouldBeUndefined("origin");
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = "ws://localhost:8880/websocket/tests/hixie76/fixed-origin";
-debug("document.domain=" + document.domain);
-debug("ws.url=" + url);
-var ws = new WebSocket(url);
-
-ws.onopen = function()
-{
-    debug("Connected");
-    connected = true;
-};
-
-ws.onmessage = function (messageEvent)
-{
-    origin = messageEvent.data;
-    debug("origin=" + origin);
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength-expected.txt
deleted file mode 100644 (file)
index 5d19d16..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-CONSOLE MESSAGE: Status line is too long
-Connection should fail immediately, rather than succeeding or staying in limbo until timeout, if handshake is longer than 1024 bytes.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS timedOut is false
-PASS connected is false
-PASS origin is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength.html
deleted file mode 100644 (file)
index 9266b24..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description('Connection should fail immediately, rather than succeeding or staying in limbo until timeout, if handshake is longer than 1024 bytes.');
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var timedOut = false;
-var connected = false;
-var origin;
-
-function endTest() {
-    shouldBeFalse('timedOut');
-    shouldBeFalse('connected');
-    shouldBeUndefined('origin');
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = 'ws://localhost:8880/websocket/tests/hixie76/handshake-fail-by-maxlength';
-var ws = new WebSocket(url);
-
-ws.onopen = function()
-{
-    debug('Connected');
-    connected = true;
-}
-
-ws.onmessage = function(messageEvent)
-{
-    origin = messageEvent.data;
-    debug('origin = ' + origin);
-    ws.close();
-}
-
-ws.onclose = function()
-{
-    endTest();
-}
-
-function timeoutCallback()
-{
-    debug('Timed out (state = ' + ws.readyState + ')');
-    timedOut = true;
-    endTest();
-}
-
-var timeoutID = setTimeout(timeoutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-maxlength_wsh.py
deleted file mode 100644 (file)
index c81d37b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (C) Research In Motion Limited 2011. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
-# following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
-# disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
-# following disclaimer in the documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-# APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    # This will cause the handshake to fail because it pushes the length of the
-    # status line past 1024 characters
-    msg = '.' * 1024
-    msg += 'HTTP/1.1 101 WebSocket Protocol Handshake\r\n'
-    msg += 'Upgrade: WebSocket\r\n'
-    msg += 'Connection: Upgrade\r\n'
-    msg += 'Sec-WebSocket-Location: ' + request.ws_location + '\r\n'
-    msg += 'Sec-WebSocket-Origin: ' + request.ws_origin + '\r\n'
-    msg += '\r\n'
-    msg += request.ws_challenge_md5
-    request.connection.write(msg)
-    raise handshake.AbortedByUserException('abort the connection') # Prevents pywebsocket from sending its own handshake message.
-
-
-def web_socket_transfer_data(request):
-    pass
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header-expected.txt
deleted file mode 100644 (file)
index e2aac4a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CONSOLE MESSAGE: Error during WebSocket handshake: 'Connection' header is missing
-Test that WebSocket handshake fails if Connection header field isn't reflected by the server.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header.html
deleted file mode 100644 (file)
index 4c06d7c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description("Test that WebSocket handshake fails if Connection header field isn't reflected by the server.");
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = "ws://localhost:8880/websocket/tests/hixie76/handshake-fail-by-no-connection-header";
-var ws = new WebSocket(url);
-
-ws.onopen = function()
-{
-    debug("FAIL: Connected");
-};
-
-ws.onmessage = function(messageEvent)
-{
-    protocol = messageEvent.data;
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-connection-header_wsh.py
deleted file mode 100644 (file)
index 1152476..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    msg = 'HTTP/1.1 101 WebSocket Protocol Handshake\r\n'
-    msg += 'Upgrade: WebSocket\r\n'
-#   Missing 'Connection: Upgrade\r\n'
-    msg += 'Sec-WebSocket-Location: ' + request.ws_location + '\r\n'
-    msg += 'Sec-WebSocket-Origin: ' + request.ws_origin + '\r\n'
-    msg += '\r\n'
-    msg += request.ws_challenge_md5
-    request.connection.write(msg)
-    print msg
-    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
-
-
-def web_socket_transfer_data(request):
-    pass
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr-expected.txt
deleted file mode 100644 (file)
index 645c5d0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-CONSOLE MESSAGE: Status line does not end with CRLF
-Handshake should fail when the first line does not end with CRLF.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS connected is false
-PASS origin is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr.html
deleted file mode 100644 (file)
index 7cc7be8..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description('Handshake should fail when the first line does not end with CRLF.');
-
-window.jsTestIsAsync = true;
-if (window.layoutTestController)
-    layoutTestController.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var connected = false;
-var origin;
-
-function endTest() {
-    shouldBeFalse('connected');
-    shouldBeUndefined('origin');
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = 'ws://localhost:8880/websocket/tests/hixie76/handshake-fail-by-no-cr';
-var ws = new WebSocket(url);
-
-ws.onopen = function()
-{
-    debug('Connected');
-    connected = true;
-}
-
-ws.onmessage = function(messageEvent)
-{
-    origin = messageEvent.data;
-    debug('origin = ' + origin);
-    ws.close();
-}
-
-ws.onclose = function()
-{
-    endTest();
-}
-
-function timeoutCallback()
-{
-    debug('Timed out (state = ' + ws.readyState + ')');
-    endTest();
-}
-
-var timeoutID = setTimeout(timeoutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-cr_wsh.py
deleted file mode 100644 (file)
index 2a360e5..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    msg = 'HTTP/1.1 101 WebSocket Protocol Handshake\n' # Does not end with "\r\n".
-    msg += 'Upgrade: WebSocket\r\n'
-    msg += 'Connection: Upgrade\r\n'
-    msg += 'Sec-WebSocket-Location: ' + request.ws_location + '\r\n'
-    msg += 'Sec-WebSocket-Origin: ' + request.ws_origin + '\r\n'
-    msg += '\r\n'
-    msg += request.ws_challenge_md5
-    request.connection.write(msg)
-    print msg
-    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
-
-
-def web_socket_transfer_data(request):
-    pass
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header-expected.txt
deleted file mode 100644 (file)
index 0d6fcc8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CONSOLE MESSAGE: Error during WebSocket handshake: 'Upgrade' header is missing
-Test that WebSocket handshake fails if Upgrade header field isn't reflected by the server.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header.html
deleted file mode 100644 (file)
index f458459..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description("Test that WebSocket handshake fails if Upgrade header field isn't reflected by the server.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = "ws://localhost:8880/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header";
-var ws = new WebSocket(url);
-
-ws.onopen = function()
-{
-    debug("FAIL: Connected");
-};
-
-ws.onmessage = function(messageEvent)
-{
-    protocol = messageEvent.data;
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-no-upgrade-header_wsh.py
deleted file mode 100644 (file)
index 436197c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    msg = 'HTTP/1.1 101 WebSocket Protocol Handshake\r\n'
-#   Missing 'Upgrade: WebSocket\r\n'
-    msg += 'Connection: Upgrade\r\n'
-    msg += 'Sec-WebSocket-Location: ' + request.ws_location + '\r\n'
-    msg += 'Sec-WebSocket-Origin: ' + request.ws_origin + '\r\n'
-    msg += '\r\n'
-    msg += request.ws_challenge_md5
-    request.connection.write(msg)
-    print msg
-    raise handshake.AbortedByUserException('Abort the connection') # Prevents pywebsocket from sending its own handshake message.
-
-
-def web_socket_transfer_data(request):
-    pass
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null-expected.txt
deleted file mode 100644 (file)
index 30b49c1..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-CONSOLE MESSAGE: Status line contains embedded null
-Connection should fail immediately, rather than succeeding or staying in limbo until timeout, if a null byte is received before the handshake.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS timedOut is false
-PASS connected is false
-PASS origin is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null.html
deleted file mode 100644 (file)
index f464dbb..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description('Connection should fail immediately, rather than succeeding or staying in limbo until timeout, if a null byte is received before the handshake.');
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var timedOut = false;
-var connected = false;
-var origin;
-
-function endTest() {
-    shouldBeFalse('timedOut');
-    shouldBeFalse('connected');
-    shouldBeUndefined('origin');
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = 'ws://localhost:8880/websocket/tests/hixie76/handshake-fail-by-prepended-null';
-var ws = new WebSocket(url);
-
-ws.onopen = function()
-{
-    debug('Connected');
-    connected = true;
-}
-
-ws.onmessage = function(messageEvent)
-{
-    origin = messageEvent.data;
-    debug('origin = ' + origin);
-    ws.close();
-}
-
-ws.onclose = function()
-{
-    endTest();
-}
-
-function timeoutCallback()
-{
-    debug('Timed out (state = ' + ws.readyState + ')');
-    timedOut = true;
-    endTest();
-}
-
-var timeoutID = setTimeout(timeoutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-prepended-null_wsh.py
deleted file mode 100644 (file)
index 2176068..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright (C) Research In Motion Limited 2011. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
-# following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
-# disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
-# following disclaimer in the documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
-# APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import time
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    # This simulates a broken server that sends a WebSocket frame before the
-    # handshake, and more frames afterwards.  It is important that if this
-    # happens the client does not buffer all the frames as the server continues
-    # to send more data - it should abort after reading a reasonable number of
-    # bytes (set arbitrarily to 1024).
-    frame = '\0Frame-contains-thirty-two-bytes'
-
-    msg = frame
-    msg += 'HTTP/1.1 101 WebSocket Protocol Handshake\r\n'
-    msg += 'Upgrade: WebSocket\r\n'
-    msg += 'Connection: Upgrade\r\n'
-    msg += 'Sec-WebSocket-Location: ' + request.ws_location + '\r\n'
-    msg += 'Sec-WebSocket-Origin: ' + request.ws_origin + '\r\n'
-    msg += '\r\n'
-    msg += request.ws_challenge_md5
-    request.connection.write(msg)
-    # continue writing data until the client disconnects
-    while True:
-        time.sleep(1)
-        numFrames = 1024 / len(frame) # write over 1024 bytes including the above handshake
-        for i in range(0, numFrames):
-            try:
-                request.connection.write(frame)
-            except Exception, e:
-                raise handshake.AbortedByUserException(e)
-
-
-def web_socket_transfer_data(request):
-    pass
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-sub-protocol-mismatch-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-sub-protocol-mismatch-expected.txt
deleted file mode 100644 (file)
index 0b7c89d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CONSOLE MESSAGE: Error during WebSocket handshake: protocol mismatch: requestting-protocol != available-protocol
-Test WebSocket handshake fail if sub protocol name mismatches.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS protocol is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-sub-protocol-mismatch.html b/LayoutTests/http/tests/websocket/tests/hixie76/handshake-fail-by-sub-protocol-mismatch.html
deleted file mode 100644 (file)
index 3a08a7e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket handshake fail if sub protocol name mismatches.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var protocol;
-
-function endTest()
-{
-    shouldBeUndefined("protocol");
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = "ws://localhost:8880/websocket/tests/hixie76/protocol-test?protocol=available-protocol";
-var ws = new WebSocket(url, "requestting-protocol");
-
-ws.onopen = function()
-{
-    debug("Connected");
-};
-
-ws.onmessage = function (messageEvent)
-{
-    protocol = messageEvent.data;
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/httponly-cookie-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/httponly-cookie-expected.txt
deleted file mode 100644 (file)
index 7b92ec3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Test WebSocket sends HttpOnly cookies.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket open
-WebSocket closed
-PASS cookie is "WK-websocket-test-httponly=1; WK-websocket-test=1"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/httponly-cookie.pl b/LayoutTests/http/tests/websocket/tests/hixie76/httponly-cookie.pl
deleted file mode 100755 (executable)
index f372693..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/perl -wT
-use strict;
-
-if ($ENV{"QUERY_STRING"} eq "clear=1") {
-    print "Content-Type: text/plain\r\n";
-    print "Set-Cookie: WK-websocket-test=0; Max-Age=0\r\n";
-    print "Set-Cookie: WK-websocket-test-httponly=0; HttpOnly; Max-Age=0\r\n";
-    print "\r\n";
-    print "Cookies are cleared.";
-    exit;
-}
-
-print "Content-Type: text/html\r\n";
-print "Set-Cookie: WK-websocket-test=1\r\n";
-print "Set-Cookie: WK-websocket-test-httponly=1; HttpOnly\r\n";
-print "\r\n";
-print <<HTML
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<p>Test WebSocket sends HttpOnly cookies.</p>
-<p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
-<div id="console"></div>
-<script>
-window.jsTestIsAsync = true;
-
-var cookie;
-
-// Normalize a cookie string
-function normalizeCookie(cookie)
-{
-    // Split the cookie string, sort it and then put it back together.
-    return cookie.split('; ').sort().join('; ');
-}
-
-function clearCookies()
-{
-    var xhr = new XMLHttpRequest();
-    xhr.open("GET", "httponly-cookie.pl?clear=1", false);
-    xhr.send(null);
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo-cookie");
-ws.onopen = function() {
-    debug("WebSocket open");
-};
-ws.onmessage = function(evt) {
-    cookie = evt.data;
-    ws.close();
-};
-ws.onclose = function() {
-    debug("WebSocket closed");
-    cookie = normalizeCookie(cookie);
-    shouldBe("cookie", '"WK-websocket-test-httponly=1; WK-websocket-test=1"');
-    clearCookies();
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
-HTML
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header-expected.txt
deleted file mode 100644 (file)
index 4ced037..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CONSOLE MESSAGE: Unexpected CR in name at pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp…
-Make sure WebSocket gives errors on long invalid upgrade header.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket is closed
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header.html b/LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header.html
deleted file mode 100644 (file)
index 9c8b5a8..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure WebSocket gives errors on long invalid upgrade header.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function finish() {
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/long-invalid-header");
-ws.onopen = function () {
-    debug("WebSocket is open");
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    finish();
-};
-var timeoutID = setTimeout("finish()", 2000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/long-invalid-header_wsh.py
deleted file mode 100644 (file)
index e953230..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-from mod_pywebsocket import handshake
-
-
-def web_socket_do_extra_handshake(request):
-    msg = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
-    msg += ("p" * 1024) + "\r\n"
-    msg += "\r\n"
-    msg += request.ws_challenge_md5
-    request.connection.write(msg)
-    raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message.
-
-
-def web_socket_transfer_data(request):
-    pass
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/multiple-connections-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/multiple-connections-expected.txt
deleted file mode 100644 (file)
index cee1efb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Test that WebSocket is not subject to HTTP connection limit. Should say PASS:
-
-PASS
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/multiple-connections.html b/LayoutTests/http/tests/websocket/tests/hixie76/multiple-connections.html
deleted file mode 100644 (file)
index 714cb49..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<p>Test that WebSocket is not subject to HTTP connection limit. Should say PASS:</p>
-<p id=result>Running...</p>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-var socketCount = 50;
-var result = document.getElementById("result");
-var sockets = [];
-
-for (i = 0; i < socketCount; ++i) {
-    var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-    sockets[i] = ws;
-    ws.onopen = function() {
-        var num = parseInt(result.innerHTML);
-        if (!num)
-            num = 0;
-        if (num != socketCount - 1)
-            result.innerHTML = num + 1;
-        else {
-            result.innerHTML = "PASS";
-            for (j = 0; j < socketCount; ++j) {
-                sockets[j].onclose = null;
-                sockets[j].close();
-            }
-            if (window.testRunner)
-                testRunner.notifyDone();
-        }
-    }
-    ws.onclose = function() { alert("FAIL: unexpected close event") }
-}
-</script>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/no-query_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/no-query_wsh.py
deleted file mode 100644 (file)
index 2b79615..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    request.ws_location = request.ws_resource.split('?', 1)[0]
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, request.ws_location)
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/null-character-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/null-character-expected.txt
deleted file mode 100644 (file)
index 6fca377..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Make sure WebSocket transfer null character
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket open
-msg should not be split by frame char \xff\0
-PASS msg is expectedMessage
-WebSocket closed
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/null-character.html b/LayoutTests/http/tests/websocket/tests/hixie76/null-character.html
deleted file mode 100644 (file)
index 42979e4..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure WebSocket transfer null character");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-// \xff in string would be \xc3\xbf on websocket connection (UTF-8)
-var expectedMessage = "Should Not\xff\0Split";
-
-ws.onopen = function()
-{
-    debug("WebSocket open");
-    ws.send(expectedMessage);
-};
-
-var msg;
-ws.onmessage = function(messageEvent)
-{
-    msg = messageEvent.data;
-    debug("msg should not be split by frame char \\xff\\0");
-    shouldBe("msg", "expectedMessage");
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    debug("WebSocket closed");
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/origin-test_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/origin-test_wsh.py
deleted file mode 100644 (file)
index 988d6af..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass # Always accept.
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, request.ws_origin)
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/protocol-test_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/protocol-test_wsh.py
deleted file mode 100644 (file)
index f43d8e6..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import cgi
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    r = request.ws_resource.split('?', 1)
-    if len(r) == 1:
-        return
-    param = cgi.parse_qs(r[1])
-    if 'protocol' in param:
-        request.ws_protocol = param['protocol'][0]
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, request.ws_protocol)
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/reload-crash-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/reload-crash-expected.txt
deleted file mode 100644 (file)
index 0175dee..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Test if it doesn't crash when reloading while Web Socket is busy
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS insert a iframe
-PASS iframe is ready.
-PASS reloaded iframe while WebSocket is busy
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/reload-crash.html b/LayoutTests/http/tests/websocket/tests/hixie76/reload-crash.html
deleted file mode 100644 (file)
index a33df46..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test if it doesn't crash when reloading while Web Socket is busy");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var frameDiv;
-var reloadCount = 0;
-
-document.iframeReady = function ()
-{
-    if (reloadCount == 0)
-        debug("PASS iframe is ready.");
-    else if (reloadCount == 1) {
-        debug("PASS reloaded iframe while WebSocket is busy");
-        finishJSTest();
-    } else
-        testFailed("iframe should not get reloaded more than once. (reloadCount = " + reloadCount + ")");
-    return reloadCount++;
-};
-
-frameDiv = document.createElement("iframe");
-frameDiv.src = "resources/reload-crash-iframe.html";
-document.body.appendChild(frameDiv);
-debug("PASS insert a iframe");
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/resources/close-on-unload-iframe-reference-in-parent.html b/LayoutTests/http/tests/websocket/tests/hixie76/resources/close-on-unload-iframe-reference-in-parent.html
deleted file mode 100644 (file)
index 8ed99bb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<html>
-<head>
-<script src="../../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-parent.document.childWebSocket = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/close-on-unload");
-
-parent.document.childWebSocket.onopen = function()
-{
-    // send "socket1" to server, so that "socket1" will be broadcasted to web sockets connected to close-on-unload when this web socket is closed.
-    parent.document.childWebSocket.send("socket1");
-};
-parent.document.childWebSocket.onmessage = function(evt)
-{
-    // "socket1" is received by server, so ready to unload this document.
-    parent.document.iframeReady(evt.data);
-};
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/resources/close-on-unload-iframe.html b/LayoutTests/http/tests/websocket/tests/hixie76/resources/close-on-unload-iframe.html
deleted file mode 100644 (file)
index 1819ed1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<html>
-<head>
-<script src="../../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/close-on-unload");
-ws.onopen = function()
-{
-    // send "socket1" to server, so that "socket1" will be broadcasted to web sockets connected to close-on-unload when this web socket is closed.
-    ws.send("socket1");
-};
-ws.onmessage = function(evt)
-{
-    // "socket1" is received by server, so ready to unload this document.
-    parent.document.iframeReady(evt.data);
-}
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/resources/reload-crash-iframe.html b/LayoutTests/http/tests/websocket/tests/hixie76/resources/reload-crash-iframe.html
deleted file mode 100644 (file)
index 2afeb49..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<head>
-<script src="../../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-var reloadCount = parent.document.iframeReady();
-if (!reloadCount) {
-    var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/close-on-unload");
-    location.reload();
-}
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-after-close-on-unload-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/send-after-close-on-unload-expected.txt
deleted file mode 100644 (file)
index cff48b1..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-Test if Web Socket opened in iframe, referred in parent document is, and try to send() returns false.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS ws on master document is ready.
-PASS insert a iframe, where open ws called 'socket1'
-PASS document.childWebSocket is non-null.
-PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...
-PASS document.childWebSocket.send('send to closed socket') is false
-PASS closedSocket is "socket1"
-PASS document.childWebSocket.readyState is 3
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-after-close-on-unload.html b/LayoutTests/http/tests/websocket/tests/hixie76/send-after-close-on-unload.html
deleted file mode 100644 (file)
index 5272ef3..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test if Web Socket opened in iframe, referred in parent document is, and try to send() returns false.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var frameDiv;
-var closedSocket;
-document.childWebSocket = null;
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/close-on-unload");
-ws.onopen = function()
-{
-    debug("PASS ws on master document is ready.");
-    frameDiv = document.createElement("iframe");
-    frameDiv.src = "resources/close-on-unload-iframe-reference-in-parent.html";
-    document.body.appendChild(frameDiv);
-    debug("PASS insert a iframe, where open ws called 'socket1'");
-};
-ws.onmessage = function(evt)
-{
-    closedSocket = evt.data;
-    ws.close();
-};
-ws.onclose = function()
-{
-    shouldBe("closedSocket", '"socket1"');
-    shouldBe("document.childWebSocket.readyState", "3");
-    finishJSTest();
-};
-
-document.iframeReady = function()
-{
-    shouldBeNonNull("document.childWebSocket");
-    debug("PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...");
-    document.body.removeChild(frameDiv);
-    shouldBeFalse("document.childWebSocket.send('send to closed socket')");
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-empty-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/send-empty-expected.txt
deleted file mode 100644 (file)
index ef0cb94..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-WebSocket: Calling send() without arguments should raise SyntaxError.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS ws.send() threw exception TypeError: Not enough arguments.
-PASS closeEvent.wasClean is true
-PASS receivedMessages.length is 1
-PASS receivedMessages[0] is "Goodbye"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-empty.html b/LayoutTests/http/tests/websocket/tests/hixie76/send-empty.html
deleted file mode 100644 (file)
index c940139..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description("WebSocket: Calling send() without arguments should raise SyntaxError.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-
-var closeEvent;
-var receivedMessages = [];
-var expectedMessages = ["Goodbye"];
-
-ws.onopen = function()
-{
-    shouldThrow("ws.send()");
-    ws.send("Goodbye");
-};
-
-ws.onmessage = function(event)
-{
-    receivedMessages.push(event.data);
-};
-
-ws.onclose = function(event)
-{
-    closeEvent = event;
-    shouldBeTrue("closeEvent.wasClean");
-
-    shouldEvaluateTo("receivedMessages.length", expectedMessages.length);
-    for (var i = 0; i < expectedMessages.length; ++i)
-        shouldBeEqualToString("receivedMessages[" + i + "]", expectedMessages[i]);
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/send-expected.txt
deleted file mode 100644 (file)
index cb3c7f5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Web Socket send test
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected.
-PASS data is FIRST_MESSAGE_TO_SEND
-PASS data is SECOND_MESSAGE_TO_SEND
-Closed.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-object-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/send-object-expected.txt
deleted file mode 100644 (file)
index ac9b2ca..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-WebSocket: send(object) should be interpreted as send(object.toString()).
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS closeEvent.wasClean is true
-PASS receivedMessages.length is 4
-PASS receivedMessages[0] is "[object Object]"
-PASS receivedMessages[1] is "[object ArrayBuffer]"
-PASS receivedMessages[2] is "[object Blob]"
-PASS receivedMessages[3] is "Goodbye"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-object.html b/LayoutTests/http/tests/websocket/tests/hixie76/send-object.html
deleted file mode 100644 (file)
index 690e6de..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script>
-description("WebSocket: send(object) should be interpreted as send(object.toString()).");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function createEmptyBlob()
-{
-    return new Blob([]);
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-
-var closeEvent;
-var receivedMessages = [];
-var expectedMessages = ["[object Object]", "[object ArrayBuffer]", "[object Blob]", "Goodbye"];
-
-ws.onopen = function()
-{
-    ws.send({});
-    ws.send(new ArrayBuffer());
-    ws.send(createEmptyBlob());
-    ws.send("Goodbye");
-};
-
-ws.onmessage = function(event)
-{
-    receivedMessages.push(event.data);
-};
-
-ws.onclose = function(event)
-{
-    closeEvent = event;
-    shouldBeTrue("closeEvent.wasClean");
-
-    shouldEvaluateTo("receivedMessages.length", expectedMessages.length);
-    for (var i = 0; i < expectedMessages.length; ++i)
-        shouldBeEqualToString("receivedMessages[" + i + "]", expectedMessages[i]);
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-throw-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/send-throw-expected.txt
deleted file mode 100644 (file)
index aa74ba3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Web Socket send test
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected.
-Caught exception: Pickles
-Closed.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send-throw.html b/LayoutTests/http/tests/websocket/tests/hixie76/send-throw.html
deleted file mode 100644 (file)
index 7e218ef..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Web Socket send test");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var ws = new WebSocket("ws://localhost:8880/websocket/tests/hixie76/send");
-
-var FIRST_MESSAGE_TO_SEND = {
-    toString: function() { throw "Pickles"; }
-};
-// data needs to be global to be accessbile from shouldBe().
-var data = "";
-
-ws.onopen = function()
-{
-    debug("Connected.");
-    try {
-        ws.send(FIRST_MESSAGE_TO_SEND);
-    } catch (ex) {
-        debug("Caught exception: " + ex);
-    }
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    debug("Closed.");
-    endTest();
-};
-
-function timeOutCallback()
-{
-    testFailed("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send.html b/LayoutTests/http/tests/websocket/tests/hixie76/send.html
deleted file mode 100644 (file)
index 6a7c085..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Web Socket send test");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var ws = new WebSocket("ws://localhost:8880/websocket/tests/hixie76/send");
-
-var FIRST_MESSAGE_TO_SEND = "This is the first message to send to the server.";
-var SECOND_MESSAGE_TO_SEND = "This is the second.";
-// data needs to be global to be accessbile from shouldBe().
-var data = "";
-
-ws.onopen = function()
-{
-    debug("Connected.");
-    ws.send(FIRST_MESSAGE_TO_SEND);
-};
-
-ws.onmessage = function(messageEvent)
-{
-    // The server should echo back the first message.
-    data = messageEvent.data;
-    shouldBe("data", "FIRST_MESSAGE_TO_SEND");
-    ws.onmessage = function(messageEvent) {
-        // The server should echo back the second message.
-        data = messageEvent.data;
-        shouldBe("data", "SECOND_MESSAGE_TO_SEND");
-    };
-    ws.send(SECOND_MESSAGE_TO_SEND);
-};
-
-ws.onclose = function()
-{
-    debug("Closed.");
-    endTest();
-};
-
-function timeOutCallback()
-{
-    testFailed("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send2_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/send2_wsh.py
deleted file mode 100644 (file)
index e2217fa..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-def web_socket_do_extra_handshake(request):
-    pass # Always accept.
-
-
-def web_socket_transfer_data(request):
-    # send 2 messages in one packet.
-    request.connection.write("\x00" + "first message" + "\xff" +
-                             "\x00" + "second message" + "\xff")
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/send_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/send_wsh.py
deleted file mode 100644 (file)
index 25104b3..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass # Always accept.
-
-
-def web_socket_transfer_data(request):
-    # Receive and echo back messages twice.
-    for unused in range(2):
-        message = msgutil.receive_message(request)
-        msgutil.send_message(request, message)
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/server-close-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/server-close-expected.txt
deleted file mode 100644 (file)
index feeda9e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-WebSocket: Test server-initiated close.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected
-Closed
-PASS closeEvent.wasClean is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/server-close.html b/LayoutTests/http/tests/websocket/tests/hixie76/server-close.html
deleted file mode 100644 (file)
index 0d3ed1c..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("WebSocket: Test server-initiated close.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/server-close");
-var closeEvent;
-
-ws.onopen = function()
-{
-    debug("Connected");
-};
-
-ws.onmessage = function(messageEvent)
-{
-    debug("Received: " + messageEvent.data);
-};
-
-ws.onclose = function(event)
-{
-    debug("Closed");
-    closeEvent = event;
-    shouldBeTrue("closeEvent.wasClean");
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/server-close_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/server-close_wsh.py
deleted file mode 100644 (file)
index a0698a3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    # After this handler exits, pywebsocket initiates the closing handshake.
-    pass
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/simple-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/simple-expected.txt
deleted file mode 100644 (file)
index e08890e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Simple Web Socket test
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Created a socket to 'ws://127.0.0.1:8880/websocket/tests/hixie76/simple'; readyState 0.
-Connected; readyState 1
-Received: 'Hello from Simple WSH.'; readyState 1
-Closed; readyState 3.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/simple-stress-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/simple-stress-expected.txt
deleted file mode 100644 (file)
index f57c3ec..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-Test sending many messages, and sending a large message.
-
-Should say PASS:
-
-Running the test...
-PASS
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/simple-stress.html b/LayoutTests/http/tests/websocket/tests/hixie76/simple-stress.html
deleted file mode 100644 (file)
index f063225..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<p>Test sending many messages, and sending a large message.</p>
-<p>Should say PASS:</p>
-<pre id=log>Running the test...
-</pre>
-<script>
-var numSmallMessages = 1000;
-
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-function log(message)
-{
-    document.getElementById("log").innerHTML += message + "\n";
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-
-ws.onopen = function() {
-    for (i = 0; i < numSmallMessages; ++i) {
-        ws.send(i);
-    }
-
-}
-
-var lastMessage = -1;
-ws.onmessage = function(msg) {
-    if (parseInt(msg.data) != lastMessage + 1)
-        log("FAIL - out of sequence response. Expected " + lastMessage + 1 + ", got " + msg.data);
-    ++lastMessage;
-    if (lastMessage == numSmallMessages - 1)
-        testLargeString();
-}
-
-function testLargeString()
-{
-    // Build a string 256K in length.
-    var str = " ";
-    for (i = 0; i < 18; ++i)
-        str += str;
-
-    ws.send(str);
-    ws.onmessage = function(msg) {
-        log(msg.data.length == str.length ? "PASS" : "FAIL - wrong response length");
-        ws.send("Goodbye");
-        ws.onmessage = null;
-        if (window.testRunner)
-            setTimeout("testRunner.notifyDone()", 0);
-    }
-}
-</script>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/simple.html b/LayoutTests/http/tests/websocket/tests/hixie76/simple.html
deleted file mode 100644 (file)
index ceb908c..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Simple Web Socket test");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/simple");
-debug("Created a socket to '" + ws.URL + "'; readyState " + ws.readyState + ".");
-
-ws.onopen = function()
-{
-    debug("Connected; readyState " + ws.readyState);
-};
-
-ws.onmessage = function(messageEvent)
-{
-    debug("Received: '" + messageEvent.data + "'; readyState " + ws.readyState);
-};
-
-ws.onclose = function()
-{
-    debug("Closed; readyState " + ws.readyState + ".");
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/simple_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/simple_wsh.py
deleted file mode 100644 (file)
index fc0271c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass # Always accept.
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, 'Hello from Simple WSH.')
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header-expected.txt
deleted file mode 100644 (file)
index 7c86f90..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-WebSocket: Hixie76 binary frames should be handled correctly even if frame header is split into multiple TCP packets.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected.
-Error occurred.
-Closed.
-PASS closeEvent.wasClean is true
-PASS errorCount is 1
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header.html b/LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header.html
deleted file mode 100644 (file)
index aa9d966..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("WebSocket: Hixie76 binary frames should be handled correctly even if frame header is split into multiple TCP packets.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://localhost:8880/websocket/tests/hixie76/split-binary-frame-header");
-var errorCount = 0;
-
-ws.onopen = function()
-{
-    debug("Connected.");
-};
-
-ws.onmessage = function(messageEvent)
-{
-    testFailed("Should not receive message but received: \"" + messageEvent.data + "\"");
-};
-
-ws.onerror = function()
-{
-    debug("Error occurred.");
-    errorCount += 1;
-};
-
-var closeEvent;
-
-ws.onclose = function(event)
-{
-    debug("Closed.");
-    closeEvent = event;
-    shouldBeTrue("closeEvent.wasClean");
-    shouldEvaluateTo("errorCount", 1);
-
-    finishJSTest();
-};
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/split-binary-frame-header_wsh.py
deleted file mode 100644 (file)
index bbbf83d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-import time
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    # First frame (1 - 2 bytes): Zero-length binary frame with frame type 0x80.
-    # Second frame (3 - 4 bytes): Close frame.
-    data = '\x80\x00\xff\x00'
-
-    # There is a bug that WebSocketChannel incorrectly consumes the first byte of a binary frame header
-    # when it is split from the entire frame data. When this happens, the client recognizes the second and
-    # third bytes ('\x00\xff') as a valid text frame and invokes a message event (which should not happen
-    # in a valid client).
-
-    request.connection.write(data[:1])
-    time.sleep(0.5) # Wait for 500ms to make sure the first octet is sent out.
-    request.connection.write(data[1:])
-
-    raise handshake.AbortedByUserException('Abort the connection')
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-expected.txt
deleted file mode 100644 (file)
index bcc1ec1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Test WebSocket handshake success with sub protocol.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected
-PASS protocol is "sub-protocol"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-with-space-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-with-space-expected.txt
deleted file mode 100644 (file)
index 021a749..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Test WebSocket handshake success with sub protocol contains space.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected
-PASS protocol is "sub protocol"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-with-space.html b/LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol-with-space.html
deleted file mode 100644 (file)
index 25d7339..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket handshake success with sub protocol contains space.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var protocol;
-
-function endTest()
-{
-    shouldBe("protocol", '"sub protocol"');
-    finishJSTest();
-}
-
-var url = "ws://localhost:8880/websocket/tests/hixie76/protocol-test?protocol=sub%20protocol";
-var ws = new WebSocket(url, "sub protocol");
-
-ws.onopen = function()
-{
-    debug("Connected");
-};
-
-ws.onmessage = function (messageEvent)
-{
-    protocol = messageEvent.data;
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol.html b/LayoutTests/http/tests/websocket/tests/hixie76/sub-protocol.html
deleted file mode 100644 (file)
index 66eb9ab..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket handshake success with sub protocol.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var protocol;
-
-function endTest()
-{
-    shouldBe("protocol", '"sub-protocol"');
-    finishJSTest();
-}
-
-var url = "ws://localhost:8880/websocket/tests/hixie76/protocol-test?protocol=sub-protocol";
-var ws = new WebSocket(url, "sub-protocol");
-
-ws.onopen = function()
-{
-    debug("Connected");
-};
-
-ws.onmessage = function (messageEvent)
-{
-    protocol = messageEvent.data;
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/undefined-attributes-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/undefined-attributes-expected.txt
deleted file mode 100644 (file)
index b65773f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Test WebSocket attributes which should not be defined when hixie-76 protocol is used.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS ws.binaryType is undefined.
-PASS ws.extensions is undefined.
-PASS ws.protocol is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/undefined-attributes.html b/LayoutTests/http/tests/websocket/tests/hixie76/undefined-attributes.html
deleted file mode 100644 (file)
index 49d574d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket attributes which should not be defined when hixie-76 protocol is used.");
-
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/simple");
-
-shouldBeUndefined("ws.binaryType");
-shouldBeUndefined("ws.extensions");
-shouldBeUndefined("ws.protocol");
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/unicode-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/unicode-expected.txt
deleted file mode 100644 (file)
index a89eb83..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Web Socket unicode message test
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected.
-Send UNICODE_HELLO.
-PASS data is UNICODE_GOODBYE
-Closed.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/unicode.html b/LayoutTests/http/tests/websocket/tests/hixie76/unicode.html
deleted file mode 100644 (file)
index 00cfc53..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Web Socket unicode message test");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var ws = new WebSocket("ws://localhost:8880/websocket/tests/hixie76/unicode");
-
-// Hello in Japanese
-var UNICODE_HELLO = "\u3053\u3093\u306b\u3061\u306f";
-// Goodbye in Japanese
-var UNICODE_GOODBYE = "\u3055\u3088\u3046\u306a\u3089";
-
-// data needs to be global to be accessbile from shouldBe().
-var data = "";
-
-ws.onopen = function()
-{
-    debug("Connected.");
-    debug("Send UNICODE_HELLO.");
-    ws.send(UNICODE_HELLO);
-};
-
-ws.onmessage = function(messageEvent)
-{
-    // The server should send back Goodbye if it receives Hello.
-    data = messageEvent.data;
-    shouldBe("data", "UNICODE_GOODBYE");
-};
-
-ws.onclose = function()
-{
-    debug("Closed.");
-    endTest();
-};
-
-function timeOutCallback()
-{
-    testFailed("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/unicode_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/unicode_wsh.py
deleted file mode 100644 (file)
index 9e31237..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-# Hello in Japanese
-_UNICODE_HELLO = u"\u3053\u3093\u306b\u3061\u306f"
-
-# Goodbye in Japanese
-_UNICODE_GOODBYE = u"\u3055\u3088\u3046\u306a\u3089"
-
-# Error message
-_ERROR_MESSAGE = "What did you say?"
-
-
-def web_socket_do_extra_handshake(request):
-    pass # Always accept.
-
-
-def web_socket_transfer_data(request):
-    hello = msgutil.receive_message(request)
-    if hello != _UNICODE_HELLO:
-        msgutil.send_message(request, _ERROR_MESSAGE)
-        return
-    msgutil.send_message(request, _UNICODE_GOODBYE)
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/unknown-frame-type_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/unknown-frame-type_wsh.py
deleted file mode 100644 (file)
index feff974..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    for i in range(1, 128):
-        request.connection.write(chr(i) + str(i) + '\xff')
-    for i in range(128, 256):
-        msg = str(i)
-        request.connection.write(chr(i) + chr(len(msg)) + msg)
-    msgutil.send_message(request, 'done')
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-attribute-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/url-attribute-expected.txt
deleted file mode 100644 (file)
index 97d42aa..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Both .URL and .url attributes should work (for compatibility reasons).
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS ws.url is "ws://127.0.0.1:8880/"
-PASS ws.URL is "ws://127.0.0.1:8880/"
-PASS ws.URL === ws.url is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-attribute.html b/LayoutTests/http/tests/websocket/tests/hixie76/url-attribute.html
deleted file mode 100644 (file)
index a55e9e4..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-
-description("Both .URL and .url attributes should work (for compatibility reasons).");
-
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var url = "ws://127.0.0.1:8880/";
-var ws = new WebSocket(url);
-
-shouldBeEqualToString("ws.url", url);
-shouldBeEqualToString("ws.URL", url);
-shouldBeTrue("ws.URL === ws.url");
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-no-trailing-slash-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/url-no-trailing-slash-expected.txt
deleted file mode 100644 (file)
index 75c90cf..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-URL that doesn't have trailing slash should not emit empty Request-URI.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-WebSocket is open
-received:ws://127.0.0.1:8880/
-WebSocket is closed
-PASS handshake_success is true
-PASS ws_location is "ws://127.0.0.1:8880/"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-no-trailing-slash.html b/LayoutTests/http/tests/websocket/tests/hixie76/url-no-trailing-slash.html
deleted file mode 100644 (file)
index e0a2c77..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("URL that doesn't have trailing slash should not emit empty Request-URI.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var url = "ws://127.0.0.1:8880";
-var handshake_success = false;
-var ws_location;
-
-var ws = new WebSocket(url);
-ws.onopen = function () {
-    debug("WebSocket is open");
-    handshake_success = true;
-};
-ws.onmessage = function (evt) {
-    ws_location = evt.data;
-    debug("received:" + ws_location);
-    ws.close();
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    shouldBeTrue("handshake_success");
-    shouldBe("ws_location", '"ws://127.0.0.1:8880/"');
-    finishJSTest();
-};
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-parsing-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/url-parsing-expected.txt
deleted file mode 100644 (file)
index 5ad1a04..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-CONSOLE MESSAGE: Invalid url for WebSocket ws://javascript:a
-CONSOLE MESSAGE: Invalid url for WebSocket /applet
-CONSOLE MESSAGE: Wrong url scheme for WebSocket javascript:a
-CONSOLE MESSAGE: WebSocket port 25 blocked
-CONSOLE MESSAGE: URL has fragment component ws://127.0.0.1/path#
-CONSOLE MESSAGE: URL has fragment component ws://127.0.0.1/path#fragment
-Test WebSocket URL parsing.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS new WebSocket() threw exception TypeError: Not enough arguments.
-PASS new WebSocket("ws://javascript:a") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("/applet") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("javascript:a") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1:25/") threw exception Error: SECURITY_ERR: DOM Exception 18.
-PASS (new WebSocket("ws://127.0.0.1:8880/a/../websocket/tests/hixie76/simple")).URL is "ws://127.0.0.1:8880/websocket/tests/hixie76/simple"
-PASS (new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/simple?")).URL is "ws://127.0.0.1:8880/websocket/tests/hixie76/simple?"
-PASS (new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/simple?k=v")).URL is "ws://127.0.0.1:8880/websocket/tests/hixie76/simple?k=v"
-PASS new WebSocket("ws://127.0.0.1/path#") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS new WebSocket("ws://127.0.0.1/path#fragment") threw exception Error: SYNTAX_ERR: DOM Exception 12.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-parsing.html b/LayoutTests/http/tests/websocket/tests/hixie76/url-parsing.html
deleted file mode 100644 (file)
index 6b67a09..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket URL parsing.");
-
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-// Not enough arguments.
-shouldThrow('new WebSocket()');
-
-// Invalid url will fail to be parsed.
-shouldThrow('new WebSocket("ws://javascript:a")');
-
-// Can't use relative URLs - because spec says so, and because the scheme is different anyway.
-shouldThrow('new WebSocket("/applet")');
-
-// Non ws URL is not allowed.
-shouldThrow('new WebSocket("javascript:a")');
-
-// UA is allowed to block access to some ports, which we do.
-shouldThrow('new WebSocket("ws://127.0.0.1:25/")');
-
-// Resolve the url string using the resolve a Web address algorithm.
-// Use 127.0.0.1:8880 and existing ws handler to make sure we don't receive unexpected response (so no console message appears)
-shouldBe('(new WebSocket("ws://127.0.0.1:8880/a/../websocket/tests/hixie76/simple")).URL', '"ws://127.0.0.1:8880/websocket/tests/hixie76/simple"');
-shouldBe('(new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/simple?")).URL', '"ws://127.0.0.1:8880/websocket/tests/hixie76/simple?"');
-shouldBe('(new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/simple?k=v")).URL', '"ws://127.0.0.1:8880/websocket/tests/hixie76/simple?k=v"');
-
-// draft-hixie-thewebsocketprotocol-60 says If /url/ has a <fragment>
-// component, then fail the parsing Web Socket URLs, so throw a SYNTAX_ERR
-// exception.
-shouldThrow('new WebSocket("ws://127.0.0.1/path#")');
-shouldThrow('new WebSocket("ws://127.0.0.1/path#fragment")');
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-with-credential-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/url-with-credential-expected.txt
deleted file mode 100644 (file)
index 9a5bd60..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Make sure handshake with URL with credentail info success.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-url=ws://user:pass@127.0.0.1:8880/websocket/tests/hixie76/echo-location
-WebSocket is open
-received:ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location
-WebSocket is closed
-PASS handshake_success is true
-PASS ws_location is "ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-with-credential.html b/LayoutTests/http/tests/websocket/tests/hixie76/url-with-credential.html
deleted file mode 100644 (file)
index e566677..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure handshake with URL with credentail info success.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var url = "ws://user:pass@127.0.0.1:8880/websocket/tests/hixie76/echo-location";
-var handshake_success = false;
-var ws_location;
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    shouldBeTrue("handshake_success");
-    shouldBe("ws_location", '"ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location"');
-    finishJSTest();
-}
-
-debug("url=" + url);
-var ws = new WebSocket(url);
-ws.onopen = function () {
-    debug("WebSocket is open");
-    handshake_success = true;
-};
-ws.onmessage = function (evt) {
-    ws_location = evt.data;
-    debug("received:" + ws_location);
-    ws.close();
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    endTest();
-};
-var timeoutID = setTimeout("endTest()", 2000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-with-empty-query-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/url-with-empty-query-expected.txt
deleted file mode 100644 (file)
index 3f151e5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Make sure handshake with URL with empty query components success.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-url=ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location?
-WebSocket is open
-received:ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location?
-WebSocket is closed
-PASS handshake_success is true
-PASS ws_location is url
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-with-empty-query.html b/LayoutTests/http/tests/websocket/tests/hixie76/url-with-empty-query.html
deleted file mode 100644 (file)
index 387f648..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure handshake with URL with empty query components success.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var url = "ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location?";
-var handshake_success = false;
-var ws_location;
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    shouldBeTrue("handshake_success");
-    shouldBe("ws_location", "url");
-    finishJSTest();
-}
-
-debug("url=" + url);
-var ws = new WebSocket(url);
-ws.onopen = function () {
-    debug("WebSocket is open");
-    handshake_success = true;
-};
-ws.onmessage = function (evt) {
-    ws_location = evt.data;
-    debug("received:" + ws_location);
-    ws.close();
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    endTest();
-};
-var timeoutID = setTimeout("endTest()", 2000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-expected.txt
deleted file mode 100644 (file)
index cc2bde4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Make sure handshake with URL with query components success.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-url=ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location?q=v
-WebSocket is open
-received:ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location?q=v
-WebSocket is closed
-PASS handshake_success is true
-PASS ws_location is url
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-for-no-query-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-for-no-query-expected.txt
deleted file mode 100644 (file)
index aa390b0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-CONSOLE MESSAGE: Error during WebSocket handshake: location mismatch: ws://127.0.0.1:8880/websocket/tests/hixie76/no-query? != /websocket/tests/hixie76/no-query
-Make sure handshake with URL with query components fails against server that doesn't support query component.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-url=ws://127.0.0.1:8880/websocket/tests/hixie76/no-query?
-WebSocket is closed
-PASS handshake_success is false
-PASS ws_location is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-for-no-query.html b/LayoutTests/http/tests/websocket/tests/hixie76/url-with-query-for-no-query.html
deleted file mode 100644 (file)
index 6a1ca79..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure handshake with URL with query components fails against server that doesn't support query component.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var url = "ws://127.0.0.1:8880/websocket/tests/hixie76/no-query?";
-var handshake_success = false;
-var ws_location;
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    shouldBeFalse("handshake_success");
-    shouldBeUndefined("ws_location");
-    finishJSTest();
-}
-
-debug("url=" + url);
-var ws = new WebSocket(url);
-ws.onopen = function () {
-    debug("WebSocket is open");
-    handshake_success = true;
-};
-ws.onmessge = function (evt) {
-    ws_location = evt.data;
-    debug("received:" + ws_location);
-    ws.close();
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    endTest();
-};
-var timeoutID = setTimeout("endTest()", 2000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/url-with-query.html b/LayoutTests/http/tests/websocket/tests/hixie76/url-with-query.html
deleted file mode 100644 (file)
index 0d978ec..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure handshake with URL with query components success.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var url = "ws://127.0.0.1:8880/websocket/tests/hixie76/echo-location?q=v";
-var handshake_success = false;
-var ws_location;
-
-function endTest()
-{
-    clearTimeout(timeoutID);
-    shouldBeTrue("handshake_success");
-    shouldBe("ws_location", "url");
-    finishJSTest();
-}
-
-debug("url=" + url);
-var ws = new WebSocket(url);
-ws.onopen = function () {
-    debug("WebSocket is open");
-    handshake_success = true;
-};
-ws.onmessage = function (evt) {
-    ws_location = evt.data;
-    debug("received:" + ws_location);
-    ws.close();
-};
-ws.onclose = function () {
-    debug("WebSocket is closed");
-    endTest();
-};
-var timeoutID = setTimeout("endTest()", 2000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/websocket-event-target-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/websocket-event-target-expected.txt
deleted file mode 100644 (file)
index 6d47e07..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-CONSOLE MESSAGE: WebSocket is closed before the connection is established.
-Make sure WebSocket object acts as EventTarget.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS open_event_handled is false
-PASS message_event_handled is false
-PASS close_event_handled is false
-PASS open_event_handled is true
-PASS open_event_handled is false
-PASS message_event_handled is true
-PASS message_event_handled is false
-PASS close_event_handled is true
-PASS close_event_handled is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/websocket-event-target.html b/LayoutTests/http/tests/websocket/tests/hixie76/websocket-event-target.html
deleted file mode 100644 (file)
index 9825c07..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Make sure WebSocket object acts as EventTarget.");
-
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/simple");
-ws.close(); // That is not a test with a WebSocket server, prevent logging an error to console.
-var open_event_handled = false;
-var message_event_handled = false;
-var close_event_handled = false;
-function openListener() {
-    open_event_handled = true;
-};
-function messageListener() {
-    message_event_handled = true;
-};
-function closeListener() {
-    close_event_handled = true;
-}
-ws.addEventListener('open', openListener, false);
-ws.addEventListener('message', messageListener, false);
-ws.addEventListener('close', closeListener, false);
-
-shouldBe("open_event_handled", "false");
-shouldBe("message_event_handled", "false");
-shouldBe("close_event_handled", "false");
-
-var evt = document.createEvent("Events");
-evt.initEvent("open", true, false);
-ws.dispatchEvent(evt);
-shouldBe("open_event_handled", "true");
-
-open_event_handled = false;
-ws.removeEventListener('open', openListener);
-ws.dispatchEvent(evt);
-shouldBe("open_event_handled", "false");
-
-evt = document.createEvent("MessageEvent");
-evt.initEvent("message", true, false);
-ws.dispatchEvent(evt);
-shouldBe("message_event_handled", "true");
-
-message_event_handled = false;
-ws.removeEventListener('message', messageListener);
-ws.dispatchEvent(evt);
-shouldBe("message_event_handled", "false");
-
-evt = document.createEvent("Events");
-evt.initEvent("close", true, false);
-ws.dispatchEvent(evt);
-shouldBe("close_event_handled", "true");
-
-close_event_handled = false;
-ws.removeEventListener('close', closeListener);
-ws.dispatchEvent(evt);
-shouldBe("close_event_handled", "false");
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/websocket-pending-activity-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/websocket-pending-activity-expected.txt
deleted file mode 100644 (file)
index 7340bc0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ALERT: PASS
-Should alert "PASS".
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/websocket-pending-activity.html b/LayoutTests/http/tests/websocket/tests/hixie76/websocket-pending-activity.html
deleted file mode 100644 (file)
index 399ff14..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<body onload="test()">
-<p>Should alert "PASS".</p>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 0);
-}
-
-function gc()
-{
-    if (window.GCController)
-        return GCController.collect();
-
-    for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
-        var s = new String("abc");
-    }
-}
-
-function test()
-{
-    var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/hixie76/echo");
-    ws.onopen = function() {
-        this.send("PASS");
-    }
-    ws.onmessage = function(msg) {
-        alert(msg.data);
-        if (window.testRunner)
-            testRunner.notifyDone();
-    }
-    ws = null;
-    gc();
-}
-</script>
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/websocket-protocol-ignored-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/websocket-protocol-ignored-expected.txt
deleted file mode 100644 (file)
index 4de6d71..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Test WebSocket handshake success without protocol and ignore WebSocket-Protocol from server.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-Connected
-PASS protocol is "sub-protocol"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/websocket-protocol-ignored.html b/LayoutTests/http/tests/websocket/tests/hixie76/websocket-protocol-ignored.html
deleted file mode 100644 (file)
index efabdef..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../../js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-description("Test WebSocket handshake success without protocol and ignore WebSocket-Protocol from server.");
-
-window.jsTestIsAsync = true;
-if (window.testRunner)
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-
-var protocol;
-
-function endTest()
-{
-    shouldBe("protocol", '"sub-protocol"');
-    clearTimeout(timeoutID);
-    finishJSTest();
-}
-
-var url = "ws://localhost:8880/websocket/tests/hixie76/protocol-test?protocol=sub-protocol";
-var ws = new WebSocket(url);
-
-ws.onopen = function()
-{
-    debug("Connected");
-};
-
-ws.onmessage = function (messageEvent)
-{
-    protocol = messageEvent.data;
-    ws.close();
-};
-
-ws.onclose = function()
-{
-    endTest();
-};
-
-function timeOutCallback()
-{
-    debug("Timed out in state: " + ws.readyState);
-    endTest();
-}
-
-var timeoutID = setTimeout(timeOutCallback, 3000);
-
-</script>
-<script src="../../../../js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-onmessage-crash-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-onmessage-crash-expected.txt
deleted file mode 100644 (file)
index dda2387..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Nested creation of two WebSockets should not cause a crash.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS: worker: Parsed successfully.
-PASS: worker: Connected.
-PASS: worker: Received message: "Hello from Simple WSH."
-PASS: worker: Closed.
-DONE
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-onmessage-crash.html b/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-onmessage-crash.html
deleted file mode 100644 (file)
index 32d3d58..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head></head>
-<body>
-<p>Nested creation of two WebSockets should not cause a crash.</p>
-<p></p>
-<p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
-<pre id=log>
-</pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-function log(message)
-{
-    document.getElementById("log").innerHTML += message + "\n";
-}
-
-function endTest()
-{
-    log("TEST COMPLETE");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-var worker = new Worker('resources/close-in-onmessage-crash.js');
-worker.onmessage = function (evt) {
-    log(evt.data);
-    if (evt.data == "DONE")
-        endTest();
-};
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-shared-worker-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-shared-worker-expected.txt
deleted file mode 100644 (file)
index 1ac33ee..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Test for Web Socket close in SharedWorker.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS: worker: init
-PASS: worker: WebSocket exists
-PASS: worker: successfullyParsed:[object WebSocket]
-PASS: worker: Connected.
-PASS: worker: Closed.
-DONE
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-shared-worker.html b/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-shared-worker.html
deleted file mode 100644 (file)
index f859a19..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head></head>
-<body>
-<p>Test for Web Socket close in SharedWorker.</p>
-<p></p>
-<p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
-<pre id=log>
-</pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-function log(message)
-{
-    document.getElementById("log").innerHTML += message + "\n";
-}
-
-function endTest()
-{
-    log("TEST COMPLETE");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-var worker = new SharedWorker('resources/close-in-worker.js', 'websocketCloseInWorker');
-worker.port.onmessage = function (evt) {
-    log(evt.data);
-    if (evt.data == "DONE")
-        endTest();
-};
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-worker-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-worker-expected.txt
deleted file mode 100644 (file)
index 7b9f905..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Test for Web Socket close in Worker.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS: worker: init
-PASS: worker: WebSocket exists
-PASS: worker: successfullyParsed:[object WebSocket]
-PASS: worker: Connected.
-PASS: worker: Closed.
-DONE
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-worker.html b/LayoutTests/http/tests/websocket/tests/hixie76/workers/close-in-worker.html
deleted file mode 100644 (file)
index ac272d3..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head></head>
-<body>
-<p>Test for Web Socket close in Worker.</p>
-<p></p>
-<p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
-<pre id=log>
-</pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-function log(message)
-{
-    document.getElementById("log").innerHTML += message + "\n";
-}
-
-function endTest()
-{
-    log("TEST COMPLETE");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-var worker = new Worker('resources/close-in-worker.js');
-worker.onmessage = function (evt) {
-    log(evt.data);
-    if (evt.data == "DONE")
-        endTest();
-};
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/close-in-onmessage-crash.js b/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/close-in-onmessage-crash.js
deleted file mode 100644 (file)
index 78c0467..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-function runTests()
-{
-    try {
-        var url = 'ws://localhost:8880/websocket/tests/hixie76/workers/resources/simple';
-        var ws = new WebSocket(url);
-
-        ws.onopen = function()
-        {
-            postMessage('PASS: worker: Connected.');
-        };
-
-        ws.onmessage = function(messageEvent)
-        {
-            postMessage('PASS: worker: Received message: "' + messageEvent.data + '"');
-            ws.close();
-        };
-
-        ws.onclose = function()
-        {
-            postMessage('PASS: worker: Closed.');
-            postMessage('DONE');
-        };
-    } catch (e) {
-        postMessage('FAIL: worker: Unexpected exception: ' + e);
-    } finally {
-        postMessage('PASS: worker: Parsed successfully.');
-    }
-}
-
-runTests();
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/close-in-worker.js b/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/close-in-worker.js
deleted file mode 100644 (file)
index aa72e81..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-if (self.postMessage)
-    runTests();
-else
-    onconnect = handleConnect;
-
-function handleConnect(event)
-{
-    // For shared workers, create a faux postMessage() API to send message back to the parent page.
-    self.postMessage = function (message) { event.ports[0].postMessage(message); };
-    runTests();
-};
-
-function runTests()
-{
-    var ws;
-    try {
-        postMessage("PASS: worker: init");
-        if ('WebSocket' in self)
-            postMessage("PASS: worker: WebSocket exists");
-        else
-            postMessage("FAIL: worker: no WebSocket");
-        ws = new WebSocket('ws://localhost:8880/websocket/tests/hixie76/workers/resources/echo');
-        ws.onopen = function() {
-            postMessage("PASS: worker: Connected.");
-            ws.close();
-        };
-        ws.onclose = function() {
-            postMessage("PASS: worker: Closed.");
-            postMessage("DONE");
-        };
-    } catch (e) {
-        postMessage("FAIL: worker: Unexpected exception: " + e);
-    } finally {
-        postMessage("PASS: worker: successfullyParsed:" + ws);
-    }
-};
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/echo-challenge_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/echo-challenge_wsh.py
deleted file mode 100644 (file)
index 390d441..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, _hexify(request.ws_challenge))
-
-
-def _hexify(bytes):
-    return ':'.join(['%02X' % ord(byte) for byte in bytes])
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/echo_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/echo_wsh.py
deleted file mode 100644 (file)
index 429f581..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 2010, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-_GOODBYE_MESSAGE = 'Goodbye'
-
-
-def web_socket_do_extra_handshake(request):
-    pass  # Always accept.
-
-
-def web_socket_transfer_data(request):
-    while True:
-        line = msgutil.receive_message(request)
-        msgutil.send_message(request, line)
-        if line == _GOODBYE_MESSAGE:
-            return
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/simple_wsh.py b/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/simple_wsh.py
deleted file mode 100644 (file)
index fc0271c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
-    pass # Always accept.
-
-
-def web_socket_transfer_data(request):
-    msgutil.send_message(request, 'Hello from Simple WSH.')
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/worker-handshake-challenge-randomness.js b/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/worker-handshake-challenge-randomness.js
deleted file mode 100644 (file)
index da651cc..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-var challenge1;
-var challenge2;
-
-function endTest()
-{
-    if (challenge1 === challenge2)
-        postMessage('FAIL: worker: challenge1 === challenge2 (challenge was ' + challenge1 + ')');
-    else
-        postMessage('PASS: worker: challenge1 !== challenge2');
-
-    postMessage('DONE');
-}
-
-function runTests()
-{
-    try {
-        var url = 'ws://localhost:8880/websocket/tests/hixie76/workers/resources/echo-challenge';
-        var ws1 = new WebSocket(url);
-
-        ws1.onmessage = function(messageEvent)
-        {
-            challenge1 = messageEvent.data;
-            ws1.close();
-        }
-
-        ws1.onclose = function()
-        {
-            var ws2 = new WebSocket(url);
-
-            ws2.onmessage = function(messageEvent)
-            {
-                challenge2 = messageEvent.data;
-                ws2.close();
-            }
-
-            ws2.onclose = function()
-            {
-                endTest();
-            }
-        }
-    } catch (e) {
-        postMessage('FAIL: worker: Unexpected exception: ' + e);
-    } finally {
-        postMessage('PASS: worker: Parsed successfully.');
-    }
-}
-
-runTests();
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/worker-simple.js b/LayoutTests/http/tests/websocket/tests/hixie76/workers/resources/worker-simple.js
deleted file mode 100644 (file)
index ef7bfd7..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-if (self.postMessage)
-    runTests();
-else
-    onconnect = handleConnect;
-
-function handleConnect(event)
-{
-    // For shared workers, create a faux postMessage() API to send message back to the parent page.
-    self.postMessage = function (message) { event.ports[0].postMessage(message); };
-    runTests();
-};
-
-function runTests()
-{
-    var ws;
-    try {
-        postMessage("PASS: worker: init");
-        if ('WebSocket' in self)
-            postMessage("PASS: worker: WebSocket exists");
-        else
-            postMessage("PASS: worker: no WebSocket");
-        ws = new WebSocket('ws://localhost:8880/websocket/tests/hixie76/workers/resources/simple');
-        ws.onopen = function() {
-            postMessage("PASS: worker: Connected.");
-        };
-        ws.onmessage = function(evt) {
-            postMessage("PASS: worker: Received: '" + evt.data + "'");
-        };
-        ws.onclose = function() {
-            postMessage("PASS: worker: Closed.");
-            postMessage("DONE");
-        };
-    } catch (e) {
-        postMessage("FAIL: worker: Unexpected exception: " + e);
-    } finally {
-        postMessage("PASS: worker: successfullyParsed:" + ws);
-    }
-};
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/shared-worker-simple-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/workers/shared-worker-simple-expected.txt
deleted file mode 100644 (file)
index 86b6bdc..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Test for Web Socket in SharedWorker.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS: worker: init
-PASS: worker: WebSocket exists
-PASS: worker: successfullyParsed:[object WebSocket]
-PASS: worker: Connected.
-PASS: worker: Received: 'Hello from Simple WSH.'
-PASS: worker: Closed.
-DONE
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/shared-worker-simple.html b/LayoutTests/http/tests/websocket/tests/hixie76/workers/shared-worker-simple.html
deleted file mode 100644 (file)
index 0c5d65d..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head></head>
-<body>
-<p>Test for Web Socket in SharedWorker.</p>
-<p></p>
-<p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
-<pre id=log>
-</pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-function log(message)
-{
-    document.getElementById("log").innerHTML += message + "\n";
-}
-
-function endTest()
-{
-    log("TEST COMPLETE");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-var worker = new SharedWorker('resources/worker-simple.js', 'websocketSimple');
-worker.port.onmessage = function (evt) {
-    log(evt.data);
-    if (evt.data == "DONE")
-        endTest();
-};
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-handshake-challenge-randomness-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-handshake-challenge-randomness-expected.txt
deleted file mode 100644 (file)
index 18c9880..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Handshake request should contain random challenge values (in a worker process).
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS: worker: Parsed successfully.
-PASS: worker: challenge1 !== challenge2
-DONE
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-handshake-challenge-randomness.html b/LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-handshake-challenge-randomness.html
deleted file mode 100644 (file)
index 64b7ae0..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head></head>
-<body>
-<p>Handshake request should contain random challenge values (in a worker process).</p>
-<p></p>
-<p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
-<pre id=log>
-</pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-function log(message)
-{
-    document.getElementById("log").innerHTML += message + "\n";
-}
-
-function endTest()
-{
-    log("TEST COMPLETE");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-var worker = new Worker('resources/worker-handshake-challenge-randomness.js');
-worker.onmessage = function (evt) {
-    log(evt.data);
-    if (evt.data == "DONE")
-        endTest();
-};
-</script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-simple-expected.txt b/LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-simple-expected.txt
deleted file mode 100644 (file)
index 165a842..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Test for Web Socket in Worker.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS: worker: init
-PASS: worker: WebSocket exists
-PASS: worker: successfullyParsed:[object WebSocket]
-PASS: worker: Connected.
-PASS: worker: Received: 'Hello from Simple WSH.'
-PASS: worker: Closed.
-DONE
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-simple.html b/LayoutTests/http/tests/websocket/tests/hixie76/workers/worker-simple.html
deleted file mode 100644 (file)
index 95a5450..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head></head>
-<body>
-<p>Test for Web Socket in Worker.</p>
-<p></p>
-<p>On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".</p>
-<pre id=log>
-</pre>
-<script>
-if (window.testRunner) {
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-    testRunner.overridePreference("WebKitHixie76WebSocketProtocolEnabled", 1);
-}
-
-function log(message)
-{
-    document.getElementById("log").innerHTML += message + "\n";
-}
-
-function endTest()
-{
-    log("TEST COMPLETE");
-    if (window.testRunner)
-        testRunner.notifyDone();
-}
-var worker = new Worker('resources/worker-simple.js');
-worker.onmessage = function (evt) {
-    log(evt.data);
-    if (evt.data == "DONE")
-        endTest();
-};
-</script>
-</body>
-</html>
index f1beb07..4bd4eeb 100644 (file)
@@ -15,8 +15,6 @@ BUGCR24182 SLOW WIN RELEASE : http/tests/loading/onload-vs-immediate-refresh.pl
 BUGCR24182 SLOW WIN DEBUG : http/tests/loading/redirect-methods.html = PASS
 BUGCR24182 SLOW WIN : http/tests/local/file-url-sent-as-referer.html = PASS
 BUGCR24182 SLOW WIN DEBUG : http/tests/misc/uncacheable-script-repeated.html = PASS
-BUGCR24182 SLOW : http/tests/websocket/tests/hixie76/frame-lengths.html = PASS
-BUGCR24182 SLOW WIN DEBUG : http/tests/websocket/tests/hixie76/simple-stress.html = PASS
 BUGCR24182 SLOW WIN : http/tests/xmlhttprequest/simple-cross-origin-progress-events.html = PASS
 BUGCR24182 SLOW WIN : http/tests/xmlhttprequest/supported-xml-content-types.html = PASS
 BUGCR24182 SLOW WIN : http/tests/xmlhttprequest/XMLHttpRequestException.html = PASS
@@ -508,8 +506,6 @@ WONTFIX SKIP : http/tests/xmlhttprequest/workers/shared-worker-methods-async.htm
 WONTFIX SKIP : http/tests/xmlhttprequest/workers/shared-worker-methods.html = TIMEOUT
 WONTFIX SKIP : http/tests/xmlhttprequest/workers/shared-worker-referer.html = TIMEOUT
 WONTFIX SKIP : http/tests/xmlhttprequest/workers/shared-worker-xhr-file-not-found.html = TIMEOUT
-WONTFIX SKIP : http/tests/websocket/tests/hixie76/workers/close-in-shared-worker.html = TIMEOUT
-WONTFIX SKIP : http/tests/websocket/tests/hixie76/workers/shared-worker-simple.html = TIMEOUT
 WONTFIX SKIP : http/tests/websocket/tests/hybi/workers/close-in-shared-worker.html = TIMEOUT
 WONTFIX SKIP : http/tests/websocket/tests/hybi/workers/shared-worker-simple.html = TIMEOUT
 WONTFIX SKIP : http/tests/inspector/network/network-shared-worker.html = PASS
index b4abd0c..3c3eb14 100644 (file)
@@ -426,9 +426,6 @@ http/tests/media/video-cancel-load.html
 # Sometimes crashes http://webkit.org/b/62024
 http/tests/media/video-cross-site.html
 
-# Sometimes crashes http://webkit.org/b/48996
-http/tests/websocket/tests/hixie76/workers/close-in-onmessage-crash.html
-
 # Sometimes times out http://webkit.org/b/48997
 animations/animation-iteration-event-destroy-renderer.html
 
@@ -969,10 +966,6 @@ media/video-display-aspect-ratio.html
 # Accept header is handled by the browser
 http/tests/misc/image-checks-for-accept.html
 
-# Tests timeout: https://bugs.webkit.org/show_bug.cgi?id=35041
-http/tests/websocket/tests/hixie76/frame-lengths.html
-http/tests/websocket/tests/hixie76/simple-stress.html
-
 # Needs platform specific API implemented in DRT, maybe not relevant for non-Mac and non-Windows ports
 fast/loader/api-test-new-window-data-load-base-url.html
 
index 949ae7b..2be654c 100644 (file)
@@ -1,3 +1,67 @@
+2012-07-10  Yuta Kitamura  <yutak@chromium.org>
+
+        WebSocket: Remove hixie76 protocol implementation
+        https://bugs.webkit.org/show_bug.cgi?id=88620
+
+        Reviewed by Adam Barth.
+
+        This change removes code that implements the old hixie-76 WebSocket protocol which
+        isn't used anymore.
+
+        No new tests are added, because the code using the current protocol should not be
+        affected. Tests for hixie-76 protocol are skipped (these tests will be removed
+        eventually).
+
+        * Modules/websockets/ThreadableWebSocketChannel.h:
+        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
+        (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
+        (WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel):
+        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
+        (ThreadableWebSocketChannelClientWrapper):
+        * Modules/websockets/WebSocket.cpp:
+        (WebCore::WebSocket::WebSocket):
+        (WebCore::WebSocket::connect):
+        (WebCore::WebSocket::send):
+        (WebCore::WebSocket::protocol):
+        (WebCore::WebSocket::extensions):
+        (WebCore::WebSocket::binaryType):
+        (WebCore::WebSocket::setBinaryType):
+        (WebCore::WebSocket::didReceiveMessageError):
+        (WebCore::WebSocket::didClose):
+        (WebCore::WebSocket::getFramingOverhead):
+        * Modules/websockets/WebSocket.h:
+        * Modules/websockets/WebSocketChannel.cpp:
+        (WebCore::WebSocketChannel::WebSocketChannel):
+        (WebCore::WebSocketChannel::connect):
+        (WebCore::WebSocketChannel::send):
+        (WebCore::WebSocketChannel::fail):
+        (WebCore::WebSocketChannel::didCloseSocketStream):
+        (WebCore::WebSocketChannel::processBuffer):
+        (WebCore::WebSocketChannel::startClosingHandshake):
+        (WebCore::WebSocketChannel::enqueueTextFrame):
+        (WebCore::WebSocketChannel::enqueueRawFrame):
+        (WebCore::WebSocketChannel::enqueueBlobFrame):
+        (WebCore::WebSocketChannel::processOutgoingFrameQueue):
+        (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
+        * Modules/websockets/WebSocketChannel.h:
+        (WebSocketChannel):
+        * Modules/websockets/WebSocketHandshake.cpp:
+        (WebCore::WebSocketHandshake::WebSocketHandshake):
+        (WebCore::WebSocketHandshake::clientHandshakeMessage):
+        (WebCore::WebSocketHandshake::clientHandshakeRequest):
+        (WebCore::WebSocketHandshake::readServerHandshake):
+        (WebCore::WebSocketHandshake::checkResponseHeaders):
+        * Modules/websockets/WebSocketHandshake.h:
+        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
+        (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create):
+        (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask):
+        (WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask):
+        (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
+        * Modules/websockets/WorkerThreadableWebSocketChannel.h:
+        (WorkerThreadableWebSocketChannel):
+        (Peer):
+        (Bridge):
+
 2012-07-09  Gavin Barraclough  <barraclough@apple.com>
 
         Threadsafety issues in WebScriptObject
index 32ea8aa..72bdc87 100644 (file)
@@ -56,7 +56,6 @@ public:
         InvalidMessage
     };
 
-    virtual bool useHixie76Protocol() = 0;
     virtual void connect(const KURL&, const String& protocol) = 0;
     virtual String subprotocol() = 0; // Will be available after didConnect() callback is invoked.
     virtual String extensions() = 0; // Will be available after didConnect() callback is invoked.
index c47e591..4e14ed9 100644 (file)
@@ -47,7 +47,6 @@ ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper
     , m_peer(0)
     , m_failedWebSocketChannelCreation(false)
     , m_syncMethodDone(true)
-    , m_useHixie76Protocol(true)
     , m_sendRequestResult(ThreadableWebSocketChannel::SendFail)
     , m_bufferedAmount(0)
     , m_suspended(false)
@@ -79,10 +78,9 @@ WorkerThreadableWebSocketChannel::Peer* ThreadableWebSocketChannelClientWrapper:
     return m_peer;
 }
 
-void ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel(WorkerThreadableWebSocketChannel::Peer* peer, bool useHixie76Protocol)
+void ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel(WorkerThreadableWebSocketChannel::Peer* peer)
 {
     m_peer = peer;
-    m_useHixie76Protocol = useHixie76Protocol;
     m_syncMethodDone = true;
 }
 
@@ -101,11 +99,6 @@ void ThreadableWebSocketChannelClientWrapper::setFailedWebSocketChannelCreation(
     m_failedWebSocketChannelCreation = true;
 }
 
-bool ThreadableWebSocketChannelClientWrapper::useHixie76Protocol() const
-{
-    return m_useHixie76Protocol;
-}
-
 String ThreadableWebSocketChannelClientWrapper::subprotocol() const
 {
     if (m_subprotocol.isEmpty())
index 1d32201..8e9dc85 100644 (file)
@@ -58,17 +58,13 @@ public:
     bool syncMethodDone() const;
 
     WorkerThreadableWebSocketChannel::Peer* peer() const;
-    void didCreateWebSocketChannel(WorkerThreadableWebSocketChannel::Peer*, bool useHixie76Protocol);
+    void didCreateWebSocketChannel(WorkerThreadableWebSocketChannel::Peer*);
     void clearPeer();
 
     bool failedWebSocketChannelCreation() const;
     void setFailedWebSocketChannelCreation();
 
-    // The value of useHixie76Protocol flag is cachable; this value is saved after WebSocketChannel (on the main
-    // thread) is constructed.
-    bool useHixie76Protocol() const;
-
-    // Subprotocol and extensions are cached too. Will be available when didConnect() callback is invoked.
+    // Subprotocol and extensions will be available when didConnect() callback is invoked.
     String subprotocol() const;
     void setSubprotocol(const String&);
     String extensions() const;
@@ -112,7 +108,6 @@ private:
     WorkerThreadableWebSocketChannel::Peer* m_peer;
     bool m_failedWebSocketChannelCreation;
     bool m_syncMethodDone;
-    bool m_useHixie76Protocol;
     // ThreadSafeRefCounted must not have String member variables.
     Vector<UChar> m_subprotocol;
     Vector<UChar> m_extensions;
index 3c5c59c..c62b655 100644 (file)
@@ -89,20 +89,6 @@ static bool isValidProtocolString(const String& protocol)
     return true;
 }
 
-static bool isValidProtocolStringHixie76(const String& protocol)
-{
-    if (protocol.isNull())
-        return true;
-    if (protocol.isEmpty())
-        return false;
-    const UChar* characters = protocol.characters();
-    for (size_t i = 0; i < protocol.length(); i++) {
-        if (characters[i] < 0x20 || characters[i] > 0x7E)
-            return false;
-    }
-    return true;
-}
-
 static String encodeProtocolString(const String& protocol)
 {
     StringBuilder builder;
@@ -158,7 +144,6 @@ WebSocket::WebSocket(ScriptExecutionContext* context)
     , m_bufferedAmount(0)
     , m_bufferedAmountAfterClose(0)
     , m_binaryType(BinaryTypeBlob)
-    , m_useHixie76Protocol(true)
     , m_subprotocol("")
     , m_extensions("")
 {
@@ -230,51 +215,37 @@ void WebSocket::connect(const String& url, const Vector<String>& protocols, Exce
     }
 
     m_channel = ThreadableWebSocketChannel::create(scriptExecutionContext(), this);
-    m_useHixie76Protocol = m_channel->useHixie76Protocol();
 
-    String protocolString;
-    if (m_useHixie76Protocol) {
-        if (!protocols.isEmpty()) {
-            // Emulate JavaScript's Array.toString() behavior.
-            protocolString = joinStrings(protocols, ",");
-        }
-        if (!isValidProtocolStringHixie76(protocolString)) {
-            scriptExecutionContext()->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong protocol for WebSocket '" + encodeProtocolString(protocolString) + "'", scriptExecutionContext()->securityOrigin()->toString());
+    // FIXME: There is a disagreement about restriction of subprotocols between WebSocket API and hybi-10 protocol
+    // draft. The former simply says "only characters in the range U+0021 to U+007E are allowed," while the latter
+    // imposes a stricter rule: "the elements MUST be non-empty strings with characters as defined in [RFC2616],
+    // and MUST all be unique strings."
+    //
+    // Here, we throw SYNTAX_ERR if the given protocols do not meet the latter criteria. This behavior does not
+    // comply with WebSocket API specification, but it seems to be the only reasonable way to handle this conflict.
+    for (size_t i = 0; i < protocols.size(); ++i) {
+        if (!isValidProtocolString(protocols[i])) {
+            scriptExecutionContext()->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong protocol for WebSocket '" + encodeProtocolString(protocols[i]) + "'", scriptExecutionContext()->securityOrigin()->toString());
             m_state = CLOSED;
             ec = SYNTAX_ERR;
             return;
         }
-    } else {
-        // FIXME: There is a disagreement about restriction of subprotocols between WebSocket API and hybi-10 protocol
-        // draft. The former simply says "only characters in the range U+0021 to U+007E are allowed," while the latter
-        // imposes a stricter rule: "the elements MUST be non-empty strings with characters as defined in [RFC2616],
-        // and MUST all be unique strings."
-        //
-        // Here, we throw SYNTAX_ERR if the given protocols do not meet the latter criteria. This behavior does not
-        // comply with WebSocket API specification, but it seems to be the only reasonable way to handle this conflict.
-        for (size_t i = 0; i < protocols.size(); ++i) {
-            if (!isValidProtocolString(protocols[i])) {
-                scriptExecutionContext()->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Wrong protocol for WebSocket '" + encodeProtocolString(protocols[i]) + "'", scriptExecutionContext()->securityOrigin()->toString());
-                m_state = CLOSED;
-                ec = SYNTAX_ERR;
-                return;
-            }
-        }
-        HashSet<String> visited;
-        for (size_t i = 0; i < protocols.size(); ++i) {
-            if (visited.contains(protocols[i])) {
-                scriptExecutionContext()->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "WebSocket protocols contain duplicates: '" + encodeProtocolString(protocols[i]) + "'", scriptExecutionContext()->securityOrigin()->toString());
-                m_state = CLOSED;
-                ec = SYNTAX_ERR;
-                return;
-            }
-            visited.add(protocols[i]);
+    }
+    HashSet<String> visited;
+    for (size_t i = 0; i < protocols.size(); ++i) {
+        if (visited.contains(protocols[i])) {
+            scriptExecutionContext()->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "WebSocket protocols contain duplicates: '" + encodeProtocolString(protocols[i]) + "'", scriptExecutionContext()->securityOrigin()->toString());
+            m_state = CLOSED;
+            ec = SYNTAX_ERR;
+            return;
         }
-
-        if (!protocols.isEmpty())
-            protocolString = joinStrings(protocols, subProtocolSeperator());
+        visited.add(protocols[i]);
     }
 
+    String protocolString;
+    if (!protocols.isEmpty())
+        protocolString = joinStrings(protocols, subProtocolSeperator());
+
     m_channel->connect(m_url, protocolString);
     ActiveDOMObject::setPendingActivity(this);
 }
@@ -307,8 +278,6 @@ bool WebSocket::send(ArrayBuffer* binaryData, ExceptionCode& ec)
 {
     LOG(Network, "WebSocket %p send arraybuffer %p", this, binaryData);
     ASSERT(binaryData);
-    if (m_useHixie76Protocol)
-        return send("[object ArrayBuffer]", ec);
     if (m_state == CONNECTING) {
         ec = INVALID_STATE_ERR;
         return false;
@@ -327,8 +296,6 @@ bool WebSocket::send(Blob* binaryData, ExceptionCode& ec)
 {
     LOG(Network, "WebSocket %p send blob %s", this, binaryData->url().string().utf8().data());
     ASSERT(binaryData);
-    if (m_useHixie76Protocol)
-        return send("[object Blob]", ec);
     if (m_state == CONNECTING) {
         ec = INVALID_STATE_ERR;
         return false;
@@ -396,22 +363,16 @@ unsigned long WebSocket::bufferedAmount() const
 
 String WebSocket::protocol() const
 {
-    if (m_useHixie76Protocol)
-        return String();
     return m_subprotocol;
 }
 
 String WebSocket::extensions() const
 {
-    if (m_useHixie76Protocol)
-        return String();
     return m_extensions;
 }
 
 String WebSocket::binaryType() const
 {
-    if (m_useHixie76Protocol)
-        return String();
     switch (m_binaryType) {
     case BinaryTypeBlob:
         return "blob";
@@ -424,8 +385,6 @@ String WebSocket::binaryType() const
 
 void WebSocket::setBinaryType(const String& binaryType, ExceptionCode& ec)
 {
-    if (m_useHixie76Protocol)
-        return;
     if (binaryType == "blob") {
         m_binaryType = BinaryTypeBlob;
         return;
@@ -531,8 +490,6 @@ void WebSocket::didReceiveBinaryData(PassOwnPtr<Vector<char> > binaryData)
 void WebSocket::didReceiveMessageError()
 {
     LOG(Network, "WebSocket %p didReceiveErrorMessage", this);
-    if (m_useHixie76Protocol && m_state != OPEN && m_state != CLOSING)
-        return;
     ASSERT(scriptExecutionContext());
     dispatchEvent(Event::create(eventNames().errorEvent, false, false));
 }
@@ -556,9 +513,7 @@ void WebSocket::didClose(unsigned long unhandledBufferedAmount, ClosingHandshake
     LOG(Network, "WebSocket %p didClose", this);
     if (!m_channel)
         return;
-    bool wasClean = m_state == CLOSING && !unhandledBufferedAmount && closingHandshakeCompletion == ClosingHandshakeComplete;
-    if (!m_useHixie76Protocol)
-        wasClean = wasClean && code != WebSocketChannel::CloseEventCodeAbnormalClosure;
+    bool wasClean = m_state == CLOSING && !unhandledBufferedAmount && closingHandshakeCompletion == ClosingHandshakeComplete && code != WebSocketChannel::CloseEventCodeAbnormalClosure;
     m_state = CLOSED;
     m_bufferedAmount = unhandledBufferedAmount;
     ASSERT(scriptExecutionContext());
@@ -584,10 +539,6 @@ EventTargetData* WebSocket::ensureEventTargetData()
 
 size_t WebSocket::getFramingOverhead(size_t payloadSize)
 {
-    static const size_t hixie76FramingOverhead = 2; // Payload is surrounded by 0x00 and 0xFF.
-    if (m_useHixie76Protocol)
-        return hixie76FramingOverhead;
-
     static const size_t hybiBaseFramingOverhead = 2; // Every frame has at least two-byte header.
     static const size_t hybiMaskingKeyLength = 4; // Every frame from client must have masking key.
     static const size_t minimumPayloadSizeWithTwoByteExtendedPayloadLength = 126;
index f25c55c..cfb61fb 100644 (file)
@@ -135,7 +135,6 @@ private:
     unsigned long m_bufferedAmount;
     unsigned long m_bufferedAmountAfterClose;
     BinaryType m_binaryType;
-    bool m_useHixie76Protocol;
     String m_subprotocol;
     String m_extensions;
 };
index c8ee9a8..faeafd2 100644 (file)
@@ -84,7 +84,6 @@ WebSocketChannel::WebSocketChannel(Document* document, WebSocketChannelClient* c
     , m_shouldDiscardReceivedData(false)
     , m_unhandledBufferedAmount(0)
     , m_identifier(0)
-    , m_useHixie76Protocol(true)
     , m_hasContinuousFrame(false)
     , m_closeEventCode(CloseEventCodeAbnormalClosure)
     , m_outgoingFrameQueueStatus(OutgoingFrameQueueOpen)
@@ -92,9 +91,6 @@ WebSocketChannel::WebSocketChannel(Document* document, WebSocketChannelClient* c
     , m_blobLoaderStatus(BlobLoaderNotStarted)
 #endif
 {
-    if (Settings* settings = m_document->settings())
-        m_useHixie76Protocol = settings->useHixie76WebSocketProtocol();
-
     if (Page* page = m_document->page())
         m_identifier = page->progress()->createUniqueIdentifier();
 }
@@ -104,19 +100,14 @@ WebSocketChannel::~WebSocketChannel()
     fastFree(m_buffer);
 }
 
-bool WebSocketChannel::useHixie76Protocol()
-{
-    return m_useHixie76Protocol;
-}
-
 void WebSocketChannel::connect(const KURL& url, const String& protocol)
 {
     LOG(Network, "WebSocketChannel %p connect", this);
     ASSERT(!m_handle);
     ASSERT(!m_suspended);
-    m_handshake = adoptPtr(new WebSocketHandshake(url, protocol, m_document, m_useHixie76Protocol));
+    m_handshake = adoptPtr(new WebSocketHandshake(url, protocol, m_document));
     m_handshake->reset();
-    if (!m_useHixie76Protocol && m_deflateFramer.canDeflate())
+    if (m_deflateFramer.canDeflate())
         m_handshake->addExtensionProcessor(m_deflateFramer.createExtensionProcessor());
     if (m_identifier)
         InspectorInstrumentation::didCreateWebSocket(m_document, m_identifier, url, m_document->url());
@@ -152,9 +143,6 @@ ThreadableWebSocketChannel::SendResult WebSocketChannel::send(const String& mess
     CString utf8 = message.utf8(true);
     if (utf8.isNull() && message.length())
         return InvalidMessage;
-    if (m_useHixie76Protocol) {
-        return sendFrameHixie76(utf8.data(), utf8.length()) ? ThreadableWebSocketChannel::SendSuccess : ThreadableWebSocketChannel::SendFail;
-    }
     enqueueTextFrame(utf8);
     // According to WebSocket API specification, WebSocket.send() should return void instead
     // of boolean. However, our implementation still returns boolean due to compatibility
@@ -168,7 +156,6 @@ ThreadableWebSocketChannel::SendResult WebSocketChannel::send(const String& mess
 ThreadableWebSocketChannel::SendResult WebSocketChannel::send(const ArrayBuffer& binaryData)
 {
     LOG(Network, "WebSocketChannel %p send arraybuffer %p", this, &binaryData);
-    ASSERT(!m_useHixie76Protocol);
     enqueueRawFrame(WebSocketFrame::OpCodeBinary, static_cast<const char*>(binaryData.data()), binaryData.byteLength());
     return ThreadableWebSocketChannel::SendSuccess;
 }
@@ -176,7 +163,6 @@ ThreadableWebSocketChannel::SendResult WebSocketChannel::send(const ArrayBuffer&
 ThreadableWebSocketChannel::SendResult WebSocketChannel::send(const Blob& binaryData)
 {
     LOG(Network, "WebSocketChannel %p send blob %s", this, binaryData.url().string().utf8().data());
-    ASSERT(!m_useHixie76Protocol);
     enqueueBlobFrame(WebSocketFrame::OpCodeBinary, binaryData);
     return ThreadableWebSocketChannel::SendSuccess;
 }
@@ -184,7 +170,6 @@ ThreadableWebSocketChannel::SendResult WebSocketChannel::send(const Blob& binary
 bool WebSocketChannel::send(const char* data, int length)
 {
     LOG(Network, "WebSocketChannel %p send binary %p (%dB)", this, data, length);
-    ASSERT(!m_useHixie76Protocol);
     enqueueRawFrame(WebSocketFrame::OpCodeBinary, data, length);
     return true;
 }
@@ -216,19 +201,18 @@ void WebSocketChannel::fail(const String& reason)
         InspectorInstrumentation::didReceiveWebSocketFrameError(m_document, m_identifier, reason);
         m_document->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, reason, m_handshake->clientOrigin());
     }
-    if (!m_useHixie76Protocol) {
-        // Hybi-10 specification explicitly states we must not continue to handle incoming data
-        // once the WebSocket connection is failed (section 7.1.7).
-        // FIXME: Should we do this in hixie-76 too?
-        RefPtr<WebSocketChannel> protect(this); // The client can close the channel, potentially removing the last reference.
-        m_shouldDiscardReceivedData = true;
-        if (m_buffer)
-            skipBuffer(m_bufferSize); // Save memory.
-        m_deflateFramer.didFail();
-        m_hasContinuousFrame = false;
-        m_continuousFrameData.clear();
-        m_client->didReceiveMessageError();
-    }
+
+    // Hybi-10 specification explicitly states we must not continue to handle incoming data
+    // once the WebSocket connection is failed (section 7.1.7).
+    RefPtr<WebSocketChannel> protect(this); // The client can close the channel, potentially removing the last reference.
+    m_shouldDiscardReceivedData = true;
+    if (m_buffer)
+        skipBuffer(m_bufferSize); // Save memory.
+    m_deflateFramer.didFail();
+    m_hasContinuousFrame = false;
+    m_continuousFrameData.clear();
+    m_client->didReceiveMessageError();
+
     if (m_handle && !m_closed)
         m_handle->disconnect(); // Will call didClose().
 }
@@ -288,7 +272,7 @@ void WebSocketChannel::didCloseSocketStream(SocketStreamHandle* handle)
     m_closed = true;
     if (m_closingTimer.isActive())
         m_closingTimer.stop();
-    if (!m_useHixie76Protocol && m_outgoingFrameQueueStatus != OutgoingFrameQueueClosed)
+    if (m_outgoingFrameQueueStatus != OutgoingFrameQueueClosed)
         abortOutgoingFrameQueue();
     if (m_handle) {
         m_unhandledBufferedAmount = m_handle->bufferedAmount();
@@ -485,9 +469,6 @@ bool WebSocketChannel::processBuffer()
     if (m_handshake->mode() != WebSocketHandshake::Connected)
         return false;
 
-    if (m_useHixie76Protocol)
-        return processFrameHixie76();
-
     return processFrame();
 }
 
@@ -509,25 +490,17 @@ void WebSocketChannel::startClosingHandshake(int code, const String& reason)
     if (m_closing)
         return;
     ASSERT(m_handle);
-    if (m_useHixie76Protocol) {
-        Vector<char> buf;
-        buf.append('\xff');
-        buf.append('\0');
-        if (!m_handle->send(buf.data(), buf.size())) {
-            m_handle->disconnect();
-            return;
-        }
-    } else {
-        Vector<char> buf;
-        if (!m_receivedClosingHandshake && code != CloseEventCodeNotSpecified) {
-            unsigned char highByte = code >> 8;
-            unsigned char lowByte = code;
-            buf.append(static_cast<char>(highByte));
-            buf.append(static_cast<char>(lowByte));
-            buf.append(reason.utf8().data(), reason.utf8().length());
-        }
-        enqueueRawFrame(WebSocketFrame::OpCodeClose, buf.data(), buf.size());
+
+    Vector<char> buf;
+    if (!m_receivedClosingHandshake && code != CloseEventCodeNotSpecified) {
+        unsigned char highByte = code >> 8;
+        unsigned char lowByte = code;
+        buf.append(static_cast<char>(highByte));
+        buf.append(static_cast<char>(lowByte));
+        buf.append(reason.utf8().data(), reason.utf8().length());
     }
+    enqueueRawFrame(WebSocketFrame::OpCodeClose, buf.data(), buf.size());
+
     m_closing = true;
     if (m_client)
         m_client->didStartClosingHandshake();
@@ -723,98 +696,8 @@ bool WebSocketChannel::processFrame()
     return m_buffer;
 }
 
-bool WebSocketChannel::processFrameHixie76()
-{
-    const char* nextFrame = m_buffer;
-    const char* p = m_buffer;
-    const char* end = p + m_bufferSize;
-
-    unsigned char frameByte = static_cast<unsigned char>(*p++);
-    if ((frameByte & 0x80) == 0x80) {
-        size_t length = 0;
-        bool errorFrame = false;
-        bool lengthFinished = false;
-        while (p < end) {
-            if (length > numeric_limits<size_t>::max() / 128) {
-                LOG(Network, "frame length overflow %lu", static_cast<unsigned long>(length));
-                errorFrame = true;
-                break;
-            }
-            size_t newLength = length * 128;
-            unsigned char msgByte = static_cast<unsigned char>(*p);
-            unsigned int lengthMsgByte = msgByte & 0x7f;
-            if (newLength > numeric_limits<size_t>::max() - lengthMsgByte) {
-                LOG(Network, "frame length overflow %lu+%u", static_cast<unsigned long>(newLength), lengthMsgByte);
-                errorFrame = true;
-                break;
-            }
-            newLength += lengthMsgByte;
-            if (newLength < length) { // sanity check
-                LOG(Network, "frame length integer wrap %lu->%lu", static_cast<unsigned long>(length), static_cast<unsigned long>(newLength));
-                errorFrame = true;
-                break;
-            }
-            length = newLength;
-            ++p;
-            if (!(msgByte & 0x80)) {
-                lengthFinished = true;
-                break;
-            }
-        }
-        if (!errorFrame && !lengthFinished)
-            return false;
-        if (p + length < p) {
-            LOG(Network, "frame buffer pointer wrap %p+%lu->%p", p, static_cast<unsigned long>(length), p + length);
-            errorFrame = true;
-        }
-        if (errorFrame) {
-            skipBuffer(m_bufferSize); // Save memory.
-            m_shouldDiscardReceivedData = true;
-            m_client->didReceiveMessageError();
-            fail("WebSocket frame length too large");
-            return false;
-        }
-        ASSERT(p + length >= p);
-        if (p + length <= end) {
-            p += length;
-            nextFrame = p;
-            ASSERT(nextFrame > m_buffer);
-            skipBuffer(nextFrame - m_buffer);
-            if (frameByte == 0xff && !length) {
-                m_receivedClosingHandshake = true;
-                startClosingHandshake(CloseEventCodeNotSpecified, "");
-                if (m_closing)
-                    m_handle->close(); // close after sending FF 00.
-            } else
-                m_client->didReceiveMessageError();
-            return m_buffer;
-        }
-        return false;
-    }
-
-    const char* msgStart = p;
-    while (p < end && *p != '\xff')
-        ++p;
-    if (p < end && *p == '\xff') {
-        int msgLength = p - msgStart;
-        ++p;
-        nextFrame = p;
-        if (frameByte == 0x00) {
-            String msg = String::fromUTF8(msgStart, msgLength);
-            skipBuffer(nextFrame - m_buffer);
-            m_client->didReceiveMessage(msg);
-        } else {
-            skipBuffer(nextFrame - m_buffer);
-            m_client->didReceiveMessageError();
-        }
-        return m_buffer;
-    }
-    return false;
-}
-
 void WebSocketChannel::enqueueTextFrame(const CString& string)
 {
-    ASSERT(!m_useHixie76Protocol);
     ASSERT(m_outgoingFrameQueueStatus == OutgoingFrameQueueOpen);
     OwnPtr<QueuedFrame> frame = adoptPtr(new QueuedFrame);
     frame->opCode = WebSocketFrame::OpCodeText;
@@ -826,7 +709,6 @@ void WebSocketChannel::enqueueTextFrame(const CString& string)
 
 void WebSocketChannel::enqueueRawFrame(WebSocketFrame::OpCode opCode, const char* data, size_t dataLength)
 {
-    ASSERT(!m_useHixie76Protocol);
     ASSERT(m_outgoingFrameQueueStatus == OutgoingFrameQueueOpen);
     OwnPtr<QueuedFrame> frame = adoptPtr(new QueuedFrame);
     frame->opCode = opCode;
@@ -840,7 +722,6 @@ void WebSocketChannel::enqueueRawFrame(WebSocketFrame::OpCode opCode, const char
 
 void WebSocketChannel::enqueueBlobFrame(WebSocketFrame::OpCode opCode, const Blob& blob)
 {
-    ASSERT(!m_useHixie76Protocol);
     ASSERT(m_outgoingFrameQueueStatus == OutgoingFrameQueueOpen);
     OwnPtr<QueuedFrame> frame = adoptPtr(new QueuedFrame);
     frame->opCode = opCode;
@@ -852,7 +733,6 @@ void WebSocketChannel::enqueueBlobFrame(WebSocketFrame::OpCode opCode, const Blo
 
 void WebSocketChannel::processOutgoingFrameQueue()
 {
-    ASSERT(!m_useHixie76Protocol);
     if (m_outgoingFrameQueueStatus == OutgoingFrameQueueClosed)
         return;
 
@@ -917,7 +797,6 @@ void WebSocketChannel::processOutgoingFrameQueue()
 
 void WebSocketChannel::abortOutgoingFrameQueue()
 {
-    ASSERT(!m_useHixie76Protocol);
     m_outgoingFrameQueue.clear();
     m_outgoingFrameQueueStatus = OutgoingFrameQueueClosed;
 #if ENABLE(BLOB)
@@ -948,18 +827,6 @@ bool WebSocketChannel::sendFrame(WebSocketFrame::OpCode opCode, const char* data
     return m_handle->send(frameData.data(), frameData.size());
 }
 
-bool WebSocketChannel::sendFrameHixie76(const char* data, size_t dataLength)
-{
-    ASSERT(m_handle);
-    ASSERT(!m_suspended);
-
-    Vector<char> frame;
-    frame.append('\0'); // Frame type.
-    frame.append(data, dataLength);
-    frame.append('\xff'); // Frame end.
-    return m_handle->send(frame.data(), frame.size());
-}
-
 }  // namespace WebCore
 
 #endif  // ENABLE(WEB_SOCKETS)
index 31e470a..09095c1 100644 (file)
@@ -68,7 +68,6 @@ public:
     bool send(const char* data, int length);
 
     // ThreadableWebSocketChannel functions.
-    virtual bool useHixie76Protocol() OVERRIDE;
     virtual void connect(const KURL&, const String& protocol) OVERRIDE;
     virtual String subprotocol() OVERRIDE;
     virtual String extensions() OVERRIDE;
@@ -138,7 +137,6 @@ private:
     void closingTimerFired(Timer<WebSocketChannel>*);
 
     bool processFrame();
-    bool processFrameHixie76();
 
     // It is allowed to send a Blob as a binary frame if hybi-10 protocol is in use. Sending a Blob
     // can be delayed because it must be read asynchronously. Other types of data (String or
@@ -148,8 +146,6 @@ private:
     // data frame is going to be sent, it first must go to the queue. Items in the queue are processed
     // in the order they were put into the queue. Sending request of a Blob blocks further processing
     // until the Blob is completely read and sent to the socket stream.
-    //
-    // When hixie-76 protocol is chosen, the queue is not used and messages are sent directly.
     enum QueuedFrameType {
         QueuedFrameTypeString,
         QueuedFrameTypeVector,
@@ -185,7 +181,6 @@ private:
     // If you are going to send a hybi-10 frame, you need to use the outgoing frame queue
     // instead of call sendFrame() directly.
     bool sendFrame(WebSocketFrame::OpCode, const char* data, size_t dataLength);
-    bool sendFrameHixie76(const char* data, size_t dataLength);
 
 #if ENABLE(BLOB)
     enum BlobLoaderStatus {
@@ -214,8 +209,6 @@ private:
 
     unsigned long m_identifier; // m_identifier == 0 means that we could not obtain a valid identifier.
 
-    bool m_useHixie76Protocol;
-
     // Private members only for hybi-10 protocol.
     bool m_hasContinuousFrame;
     WebSocketFrame::OpCode m_continuousFrameOpCode;
index 30c0886..f7c8369 100644 (file)
@@ -95,74 +95,6 @@ static String trimInputSample(const char* p, size_t len)
     return s;
 }
 
-static uint32_t randomNumberLessThan(uint32_t n)
-{
-    if (!n)
-        return 0;
-    if (n == std::numeric_limits<uint32_t>::max())
-        return cryptographicallyRandomNumber();
-    uint32_t max = std::numeric_limits<uint32_t>::max() - (std::numeric_limits<uint32_t>::max() % n);
-    ASSERT(!(max % n));
-    uint32_t v;
-    do {
-        v = cryptographicallyRandomNumber();
-    } while (v >= max);
-    return v % n;
-}
-
-static void generateHixie76SecWebSocketKey(uint32_t& number, String& key)
-{
-    uint32_t space = randomNumberLessThan(12) + 1;
-    uint32_t max = 4294967295U / space;
-    number = randomNumberLessThan(max);
-    uint32_t product = number * space;
-
-    String s = String::number(product);
-    int n = randomNumberLessThan(12) + 1;
-    DEFINE_STATIC_LOCAL(String, randomChars, (randomCharacterInSecWebSocketKey));
-    for (int i = 0; i < n; i++) {
-        int pos = randomNumberLessThan(s.length() + 1);
-        int chpos = randomNumberLessThan(randomChars.length());
-        s.insert(randomChars.substring(chpos, 1), pos);
-    }
-    DEFINE_STATIC_LOCAL(String, spaceChar, (" "));
-    for (uint32_t i = 0; i < space; i++) {
-        int pos = randomNumberLessThan(s.length() - 1) + 1;
-        s.insert(spaceChar, pos);
-    }
-    ASSERT(s[0] != ' ');
-    ASSERT(s[s.length() - 1] != ' ');
-    key = s;
-}
-
-static void generateHixie76Key3(unsigned char key3[8])
-{
-    cryptographicallyRandomValues(key3, 8);
-}
-
-static void setChallengeNumber(unsigned char* buf, uint32_t number)
-{
-    unsigned char* p = buf + 3;
-    for (int i = 0; i < 4; i++) {
-        *p = number & 0xFF;
-        --p;
-        number >>= 8;
-    }
-}
-
-static void generateHixie76ExpectedChallengeResponse(uint32_t number1, uint32_t number2, unsigned char key3[8], unsigned char expectedChallenge[16])
-{
-    unsigned char challenge[16];
-    setChallengeNumber(&challenge[0], number1);
-    setChallengeNumber(&challenge[4], number2);
-    memcpy(&challenge[8], key3, 8);
-    MD5 md5;
-    md5.addBytes(challenge, sizeof(challenge));
-    Vector<uint8_t, 16> digest;
-    md5.checksum(digest);
-    memcpy(expectedChallenge, digest.data(), 16);
-}
-
 static String generateSecWebSocketKey()
 {
     static const size_t nonceSize = 16;
@@ -184,25 +116,15 @@ String WebSocketHandshake::getExpectedWebSocketAccept(const String& secWebSocket
     return base64Encode(reinterpret_cast<const char*>(hash.data()), sha1HashSize);
 }
 
-WebSocketHandshake::WebSocketHandshake(const KURL& url, const String& protocol, ScriptExecutionContext* context, bool useHixie76Protocol)
+WebSocketHandshake::WebSocketHandshake(const KURL& url, const String& protocol, ScriptExecutionContext* context)
     : m_url(url)
     , m_clientProtocol(protocol)
     , m_secure(m_url.protocolIs("wss"))
     , m_context(context)
-    , m_useHixie76Protocol(useHixie76Protocol)
     , m_mode(Incomplete)
 {
-    if (m_useHixie76Protocol) {
-        uint32_t number1;
-        uint32_t number2;
-        generateHixie76SecWebSocketKey(number1, m_hixie76SecWebSocketKey1);
-        generateHixie76SecWebSocketKey(number2, m_hixie76SecWebSocketKey2);
-        generateHixie76Key3(m_hixie76Key3);
-        generateHixie76ExpectedChallengeResponse(number1, number2, m_hixie76Key3, m_hixie76ExpectedChallengeResponse);
-    } else {
-        m_secWebSocketKey = generateSecWebSocketKey();
-        m_expectedAccept = getExpectedWebSocketAccept(m_secWebSocketKey);
-    }
+    m_secWebSocketKey = generateSecWebSocketKey();
+    m_expectedAccept = getExpectedWebSocketAccept(m_secWebSocketKey);
 }
 
 WebSocketHandshake::~WebSocketHandshake()
@@ -264,10 +186,7 @@ CString WebSocketHandshake::clientHandshakeMessage() const
     builder.append(" HTTP/1.1\r\n");
 
     Vector<String> fields;
-    if (m_useHixie76Protocol)
-        fields.append("Upgrade: WebSocket");
-    else
-        fields.append("Upgrade: websocket");
+    fields.append("Upgrade: websocket");
     fields.append("Connection: Upgrade");
     fields.append("Host: " + hostName(m_url, m_secure));
     fields.append("Origin: " + clientOrigin());
@@ -283,16 +202,11 @@ CString WebSocketHandshake::clientHandshakeMessage() const
         // Set "Cookie2: <cookie>" if cookies 2 exists for url?
     }
 
-    if (m_useHixie76Protocol) {
-        fields.append("Sec-WebSocket-Key1: " + m_hixie76SecWebSocketKey1);
-        fields.append("Sec-WebSocket-Key2: " + m_hixie76SecWebSocketKey2);
-    } else {
-        fields.append("Sec-WebSocket-Key: " + m_secWebSocketKey);
-        fields.append("Sec-WebSocket-Version: 13");
-        const String extensionValue = m_extensionDispatcher.createHeaderValue();
-        if (extensionValue.length())
-            fields.append("Sec-WebSocket-Extensions: " + extensionValue);
-    }
+    fields.append("Sec-WebSocket-Key: " + m_secWebSocketKey);
+    fields.append("Sec-WebSocket-Version: 13");
+    const String extensionValue = m_extensionDispatcher.createHeaderValue();
+    if (extensionValue.length())
+        fields.append("Sec-WebSocket-Extensions: " + extensionValue);
 
     // Fields in the handshake are sent by the client in a random order; the
     // order is not meaningful.  Thus, it's ok to send the order we constructed
@@ -305,16 +219,7 @@ CString WebSocketHandshake::clientHandshakeMessage() const
 
     builder.append("\r\n");
 
-    CString handshakeHeader = builder.toString().utf8();
-    // Hybi-10 handshake is complete at this point.
-    if (!m_useHixie76Protocol)
-        return handshakeHeader;
-    // Hixie-76 protocol requires sending eight-byte data (so-called "key3") after the request header fields.
-    char* characterBuffer = 0;
-    CString msg = CString::newUninitialized(handshakeHeader.length() + sizeof(m_hixie76Key3), characterBuffer);
-    memcpy(characterBuffer, handshakeHeader.data(), handshakeHeader.length());
-    memcpy(characterBuffer + handshakeHeader.length(), m_hixie76Key3, sizeof(m_hixie76Key3));
-    return msg;
+    return builder.toString().utf8();
 }
 
 PassRefPtr<WebSocketHandshakeRequest> WebSocketHandshake::clientHandshakeRequest() const
@@ -323,10 +228,7 @@ PassRefPtr<WebSocketHandshakeRequest> WebSocketHandshake::clientHandshakeRequest
     // FIXME: do we need to store m_secWebSocketKey1, m_secWebSocketKey2 and
     // m_key3 in WebSocketHandshakeRequest?
     RefPtr<WebSocketHandshakeRequest> request = WebSocketHandshakeRequest::create("GET", m_url);
-    if (m_useHixie76Protocol)
-        request->addHeaderField("Upgrade", "WebSocket");
-    else
-        request->addHeaderField("Upgrade", "websocket");
+    request->addHeaderField("Upgrade", "websocket");
     request->addHeaderField("Connection", "Upgrade");
     request->addHeaderField("Host", hostName(m_url, m_secure));
     request->addHeaderField("Origin", clientOrigin());
@@ -342,17 +244,11 @@ PassRefPtr<WebSocketHandshakeRequest> WebSocketHandshake::clientHandshakeRequest
         // Set "Cookie2: <cookie>" if cookies 2 exists for url?
     }
 
-    if (m_useHixie76Protocol) {
-        request->addHeaderField("Sec-WebSocket-Key1", m_hixie76SecWebSocketKey1);
-        request->addHeaderField("Sec-WebSocket-Key2", m_hixie76SecWebSocketKey2);
-        request->setKey3(m_hixie76Key3);
-    } else {
-        request->addHeaderField("Sec-WebSocket-Key", m_secWebSocketKey);
-        request->addHeaderField("Sec-WebSocket-Version", "13");
-        const String extensionValue = m_extensionDispatcher.createHeaderValue();
-        if (extensionValue.length())
-            request->addHeaderField("Sec-WebSocket-Extensions", extensionValue);
-    }
+    request->addHeaderField("Sec-WebSocket-Key", m_secWebSocketKey);
+    request->addHeaderField("Sec-WebSocket-Version", "13");
+    const String extensionValue = m_extensionDispatcher.createHeaderValue();
+    if (extensionValue.length())
+        request->addHeaderField("Sec-WebSocket-Extensions", extensionValue);
 
     return request.release();
 }
@@ -406,26 +302,8 @@ int WebSocketHandshake::readServerHandshake(const char* header, size_t len)
         return p - header;
     }
 
-    if (!m_useHixie76Protocol) { // Hybi-10 handshake is complete at this point.
-        m_mode = Connected;
-        return p - header;
-    }
-
-    // In hixie-76 protocol, server's handshake contains sixteen-byte data (called "challenge response")
-    // after the header fields.
-    if (len < static_cast<size_t>(p - header + sizeof(m_hixie76ExpectedChallengeResponse))) {
-        // Just hasn't been received /expected/ yet.
-        m_mode = Incomplete;
-        return -1;
-    }
-
-    m_response.setChallengeResponse(static_cast<const unsigned char*>(static_cast<const void*>(p)));
-    if (memcmp(p, m_hixie76ExpectedChallengeResponse, sizeof(m_hixie76ExpectedChallengeResponse))) {
-        m_mode = Failed;
-        return (p - header) + sizeof(m_hixie76ExpectedChallengeResponse);
-    }
     m_mode = Connected;
-    return (p - header) + sizeof(m_hixie76ExpectedChallengeResponse);
+    return p - header;
 }
 
 WebSocketHandshake::Mode WebSocketHandshake::mode() const
@@ -438,16 +316,6 @@ String WebSocketHandshake::failureReason() const
     return m_failureReason;
 }
 
-String WebSocketHandshake::serverWebSocketOrigin() const
-{
-    return m_response.headerFields().get("sec-websocket-origin");
-}
-
-String WebSocketHandshake::serverWebSocketLocation() const
-{
-    return m_response.headerFields().get("sec-websocket-location");
-}
-
 String WebSocketHandshake::serverWebSocketProtocol() const
 {
     return m_response.headerFields().get("sec-websocket-protocol");
@@ -619,8 +487,6 @@ const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* e
 
 bool WebSocketHandshake::checkResponseHeaders()
 {
-    const String& serverWebSocketLocation = this->serverWebSocketLocation();
-    const String& serverWebSocketOrigin = this->serverWebSocketOrigin();
     const String& serverWebSocketProtocol = this->serverWebSocketProtocol();
     const String& serverUpgrade = this->serverUpgrade();
     const String& serverConnection = this->serverConnection();
@@ -634,20 +500,9 @@ bool WebSocketHandshake::checkResponseHeaders()
         m_failureReason = "Error during WebSocket handshake: 'Connection' header is missing";
         return false;
     }
-    if (m_useHixie76Protocol) {
-        if (serverWebSocketOrigin.isNull()) {
-            m_failureReason = "Error during WebSocket handshake: 'Sec-WebSocket-Origin' header is missing";
-            return false;
-        }
-        if (serverWebSocketLocation.isNull()) {
-            m_failureReason = "Error during WebSocket handshake: 'Sec-WebSocket-Location' header is missing";
-            return false;
-        }
-    } else {
-        if (serverWebSocketAccept.isNull()) {
-            m_failureReason = "Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing";
-            return false;
-        }
+    if (serverWebSocketAccept.isNull()) {
+        m_failureReason = "Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing";
+        return false;
     }
 
     if (!equalIgnoringCase(serverUpgrade, "websocket")) {
@@ -659,36 +514,21 @@ bool WebSocketHandshake::checkResponseHeaders()
         return false;
     }
 
-    if (m_useHixie76Protocol) {
-        if (clientOrigin() != serverWebSocketOrigin) {
-            m_failureReason = "Error during WebSocket handshake: origin mismatch: " + clientOrigin() + " != " + serverWebSocketOrigin;
-            return false;
-        }
-        if (clientLocation() != serverWebSocketLocation) {
-            m_failureReason = "Error during WebSocket handshake: location mismatch: " + clientLocation() + " != " + serverWebSocketLocation;
-            return false;
-        }
-        if (!m_clientProtocol.isEmpty() && m_clientProtocol != serverWebSocketProtocol) {
-            m_failureReason = "Error during WebSocket handshake: protocol mismatch: " + m_clientProtocol + " != " + serverWebSocketProtocol;
+    if (serverWebSocketAccept != m_expectedAccept) {
+        m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Accept mismatch";
+        return false;
+    }
+    if (!serverWebSocketProtocol.isNull()) {
+        if (m_clientProtocol.isEmpty()) {
+            m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch";
             return false;
         }
-    } else {
-        if (serverWebSocketAccept != m_expectedAccept) {
-            m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Accept mismatch";
+        Vector<String> result;
+        m_clientProtocol.split(String(WebSocket::subProtocolSeperator()), result);
+        if (!result.contains(serverWebSocketProtocol)) {
+            m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch";
             return false;
         }
-        if (!serverWebSocketProtocol.isNull()) {
-            if (m_clientProtocol.isEmpty()) {
-                m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch";
-                return false;
-            }
-            Vector<String> result;
-            m_clientProtocol.split(String(WebSocket::subProtocolSeperator()), result);
-            if (!result.contains(serverWebSocketProtocol)) {
-                m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Protocol mismatch";
-                return false;
-            }
-        }
     }
     return true;
 }
index 21d1f3f..5d0c17f 100644 (file)
@@ -51,7 +51,7 @@ public:
     enum Mode {
         Incomplete, Normal, Failed, Connected
     };
-    WebSocketHandshake(const KURL&, const String& protocol, ScriptExecutionContext*, bool useHixie76Protocol);
+    WebSocketHandshake(const KURL&, const String& protocol, ScriptExecutionContext*);
     ~WebSocketHandshake();
 
     const KURL& url() const;
@@ -76,14 +76,12 @@ public:
     Mode mode() const;
     String failureReason() const; // Returns a string indicating the reason of failure if mode() == Failed.
 
-    String serverWebSocketOrigin() const; // Only for hixie-76 handshake.
-    String serverWebSocketLocation() const; // Only for hixie-76 handshake.
     String serverWebSocketProtocol() const;
     String serverSetCookie() const;
     String serverSetCookie2() const;
     String serverUpgrade() const;
     String serverConnection() const;
-    String serverWebSocketAccept() const; // Only for hybi-10 handshake.
+    String serverWebSocketAccept() const;
     String acceptedExtensions() const;
 
     const WebSocketHandshakeResponse& serverHandshakeResponse() const;
@@ -106,7 +104,6 @@ private:
     String m_clientProtocol;
     bool m_secure;
     ScriptExecutionContext* m_context;
-    bool m_useHixie76Protocol;
 
     Mode m_mode;
 
@@ -114,13 +111,6 @@ private:
 
     String m_failureReason;
 
-    // For hixie-76 handshake.
-    String m_hixie76SecWebSocketKey1;
-    String m_hixie76SecWebSocketKey2;
-    unsigned char m_hixie76Key3[8];
-    unsigned char m_hixie76ExpectedChallengeResponse[16];
-
-    // For hybi-10 handshake.
     String m_secWebSocketKey;
     String m_expectedAccept;
 
index d2c53dd..250c019 100644 (file)
@@ -66,12 +66,6 @@ WorkerThreadableWebSocketChannel::~WorkerThreadableWebSocketChannel()
         m_bridge->disconnect();
 }
 
-bool WorkerThreadableWebSocketChannel::useHixie76Protocol()
-{
-    ASSERT(m_workerClientWrapper);
-    return m_workerClientWrapper->useHixie76Protocol();
-}
-
 void WorkerThreadableWebSocketChannel::connect(const KURL& url, const String& protocol)
 {
     if (m_bridge)
@@ -166,13 +160,6 @@ WorkerThreadableWebSocketChannel::Peer::~Peer()
         m_mainWebSocketChannel->disconnect();
 }
 
-bool WorkerThreadableWebSocketChannel::Peer::useHixie76Protocol()
-{
-    ASSERT(isMainThread());
-    ASSERT(m_mainWebSocketChannel);
-    return m_mainWebSocketChannel->useHixie76Protocol();
-}
-
 void WorkerThreadableWebSocketChannel::Peer::connect(const KURL& url, const String& protocol)
 {
     ASSERT(isMainThread());
@@ -376,10 +363,9 @@ class WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask : public
 public:
     static PassOwnPtr<ScriptExecutionContext::Task> create(WorkerThreadableWebSocketChannel::Peer* peer,
                                                            WorkerLoaderProxy* loaderProxy,
-                                                           PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper,
-                                                           bool useHixie76Protocol)
+                                                           PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
     {
-        return adoptPtr(new WorkerContextDidInitializeTask(peer, loaderProxy, workerClientWrapper, useHixie76Protocol));
+        return adoptPtr(new WorkerContextDidInitializeTask(peer, loaderProxy, workerClientWrapper));
     }
 
     virtual ~WorkerContextDidInitializeTask() { }
@@ -392,26 +378,23 @@ public:
             m_peer = 0;
             m_loaderProxy->postTaskToLoader(createCallbackTask(&WorkerThreadableWebSocketChannel::mainThreadDestroy, peer.release()));
         } else
-            m_workerClientWrapper->didCreateWebSocketChannel(m_peer, m_useHixie76Protocol);
+            m_workerClientWrapper->didCreateWebSocketChannel(m_peer);
     }
     virtual bool isCleanupTask() const OVERRIDE { return true; }
 
 private:
     WorkerContextDidInitializeTask(WorkerThreadableWebSocketChannel::Peer* peer,
                                    WorkerLoaderProxy* loaderProxy,
-                                   PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper,
-                                   bool useHixie76Protocol)
+                                   PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
         : m_peer(peer)
         , m_loaderProxy(loaderProxy)
         , m_workerClientWrapper(workerClientWrapper)
-        , m_useHixie76Protocol(useHixie76Protocol)
     {
     }
 
     WorkerThreadableWebSocketChannel::Peer* m_peer;
     WorkerLoaderProxy* m_loaderProxy;
     RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper;
-    bool m_useHixie76Protocol;
 };
 
 void WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize(ScriptExecutionContext* context, WorkerLoaderProxy* loaderProxy, PassRefPtr<ThreadableWebSocketChannelClientWrapper> prpClientWrapper, const String& taskMode)
@@ -423,7 +406,7 @@ void WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize(ScriptExecut
 
     Peer* peer = Peer::create(clientWrapper, *loaderProxy, context, taskMode);
     bool sent = loaderProxy->postTaskForModeToWorkerContext(
-        WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create(peer, loaderProxy, clientWrapper, peer->useHixie76Protocol()), taskMode);
+        WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create(peer, loaderProxy, clientWrapper), taskMode);
     if (!sent) {
         clientWrapper->clearPeer();
         delete peer;
index 715b63a..472b982 100644 (file)
@@ -62,7 +62,6 @@ public:
     virtual ~WorkerThreadableWebSocketChannel();
 
     // ThreadableWebSocketChannel functions.
-    virtual bool useHixie76Protocol() OVERRIDE;
     virtual void connect(const KURL&, const String& protocol) OVERRIDE;
     virtual String subprotocol() OVERRIDE;
     virtual String extensions() OVERRIDE;
@@ -87,7 +86,6 @@ public:
         }
         ~Peer();
 
-        bool useHixie76Protocol();
         void connect(const KURL&, const String& protocol);
         void send(const String& message);
         void send(const ArrayBuffer&);
@@ -151,7 +149,7 @@ private:
     private:
         Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, PassRefPtr<WorkerContext>, const String& taskMode);
 
-        static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, PassRefPtr<ThreadableWebSocketChannelClientWrapper>, bool useHixie76Protocol);
+        static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, PassRefPtr<ThreadableWebSocketChannelClientWrapper>);
 
         // Executed on the main thread to create a Peer for this bridge.
         static void mainThreadInitialize(ScriptExecutionContext*, WorkerLoaderProxy*, PassRefPtr<ThreadableWebSocketChannelClientWrapper>, const String& taskMode);