[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 14:02:30 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 044353148a1da07295c2c4e2520484c10403ff43
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 1 19:40:07 2010 +0000

    2010-09-30  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            WebSocket tests are flaky
            https://bugs.webkit.org/show_bug.cgi?id=46956
    
            Hosting the WebSocket tests using the Python HTTP server causes the
            tests to time out occationally.  This patch moves the tests to be
            hosted by the usual Apache server.
    
            This patch doesn't completely eliminate the flakiness.  However,
            testing on my local machine shows that it reduces it by a large factor.
            I suspect there's more flakiness hiding in the Python server, but this
            patch makes some amount of progress on the issue.
    
            * http/tests/websocket: Copied from LayoutTests/websocket.
            * http/tests/websocket/tests/alert-in-event-handler.html:
            * http/tests/websocket/tests/bad-handshake-crash.html:
            * http/tests/websocket/tests/bad-sub-protocol-control-chars.html:
            * http/tests/websocket/tests/bad-sub-protocol-empty.html:
            * http/tests/websocket/tests/bad-sub-protocol-non-ascii.html:
            * http/tests/websocket/tests/bufferedAmount-after-close.html:
            * http/tests/websocket/tests/close-on-navigate-new-location.html:
            * http/tests/websocket/tests/close-on-unload-and-force-gc.html:
            * http/tests/websocket/tests/close-on-unload-reference-in-parent.html:
            * http/tests/websocket/tests/close-on-unload.html:
            * http/tests/websocket/tests/cross-origin-expected.txt:
            * http/tests/websocket/tests/cross-origin.html:
            * http/tests/websocket/tests/error-detect.html:
            * http/tests/websocket/tests/frame-length-longer-than-buffer.html:
            * http/tests/websocket/tests/frame-length-overflow.html:
            * http/tests/websocket/tests/frame-length-skip.html:
            * http/tests/websocket/tests/handshake-challenge-randomness.html:
            * http/tests/websocket/tests/handshake-error.html:
            * http/tests/websocket/tests/handshake-fail-by-cross-origin-expected.txt:
            * http/tests/websocket/tests/handshake-fail-by-cross-origin.html:
            * http/tests/websocket/tests/handshake-fail-by-no-cr.html:
            * http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html:
            * http/tests/websocket/tests/httponly-cookie.pl:
            * http/tests/websocket/tests/long-invalid-header.html:
            * http/tests/websocket/tests/null-character.html:
            * http/tests/websocket/tests/reload-crash.html:
            * http/tests/websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html:
            * http/tests/websocket/tests/resources/close-on-unload-iframe.html:
            * http/tests/websocket/tests/resources/js-test-post-function.js: Copied from LayoutTests/fast/js/resources/js-test-post-function.js.
            * http/tests/websocket/tests/resources/js-test-pre.js: Copied from LayoutTests/fast/js/resources/js-test-pre.js.
            * http/tests/websocket/tests/resources/js-test-style.css: Copied from LayoutTests/fast/js/resources/js-test-style.css.
            * http/tests/websocket/tests/resources/reload-crash-iframe.html:
            * http/tests/websocket/tests/script-tests/TEMPLATE.html:
            * http/tests/websocket/tests/script-tests/cross-origin.js:
            (endTest):
            * http/tests/websocket/tests/send-after-close-on-unload.html:
            * http/tests/websocket/tests/send-throw.html:
            * http/tests/websocket/tests/send.html:
            * http/tests/websocket/tests/simple.html:
            * http/tests/websocket/tests/sub-protocol-with-space.html:
            * http/tests/websocket/tests/sub-protocol.html:
            * http/tests/websocket/tests/unicode.html:
            * http/tests/websocket/tests/url-no-trailing-slash.html:
            * http/tests/websocket/tests/url-parsing-expected.txt:
            * http/tests/websocket/tests/url-parsing.html:
            * http/tests/websocket/tests/url-with-credential.html:
            * http/tests/websocket/tests/url-with-empty-query.html:
            * http/tests/websocket/tests/url-with-query-for-no-query.html:
            * http/tests/websocket/tests/url-with-query.html:
            * http/tests/websocket/tests/websocket-event-target.html:
            * http/tests/websocket/tests/websocket-protocol-ignored.html:
            * platform/chromium-gpu/test_expectations.txt:
            * platform/chromium/test_expectations.txt:
            * platform/mac/test_expectations.txt:
            * platform/win/Skipped:
            * websocket: Removed.
            * websocket/resources: Removed.
            * websocket/resources/server-failed-to-start.html: Removed.
            * websocket/tests: Removed.
            * websocket/tests/alert-in-event-handler-expected.txt: Removed.
            * websocket/tests/alert-in-event-handler.html: Removed.
            * websocket/tests/bad-handshake-crash-expected.txt: Removed.
            * websocket/tests/bad-handshake-crash.html: Removed.
            * websocket/tests/bad-handshake-crash_wsh.py: Removed.
            * websocket/tests/bad-sub-protocol-control-chars-expected.txt: Removed.
            * websocket/tests/bad-sub-protocol-control-chars.html: Removed.
            * websocket/tests/bad-sub-protocol-empty-expected.txt: Removed.
            * websocket/tests/bad-sub-protocol-empty.html: Removed.
            * websocket/tests/bad-sub-protocol-non-ascii-expected.txt: Removed.
            * websocket/tests/bad-sub-protocol-non-ascii.html: Removed.
            * websocket/tests/bufferedAmount-after-close-expected.txt: Removed.
            * websocket/tests/bufferedAmount-after-close.html: Removed.
            * websocket/tests/close-on-navigate-new-location-expected.txt: Removed.
            * websocket/tests/close-on-navigate-new-location.html: Removed.
            * websocket/tests/close-on-unload-and-force-gc-expected.txt: Removed.
            * websocket/tests/close-on-unload-and-force-gc.html: Removed.
            * websocket/tests/close-on-unload-expected.txt: Removed.
            * websocket/tests/close-on-unload-reference-in-parent-expected.txt: Removed.
            * websocket/tests/close-on-unload-reference-in-parent.html: Removed.
            * websocket/tests/close-on-unload.html: Removed.
            * websocket/tests/close-on-unload_wsh.py: Removed.
            * websocket/tests/cross-origin-expected.txt: Removed.
            * websocket/tests/cross-origin.html: Removed.
            * websocket/tests/echo-challenge_wsh.py: Removed.
            * websocket/tests/echo-cookie_wsh.py: Removed.
            * websocket/tests/echo-location_wsh.py: Removed.
            * websocket/tests/echo_wsh.py: Removed.
            * websocket/tests/error-detect-expected.txt: Removed.
            * websocket/tests/error-detect.html: Removed.
            * websocket/tests/fixed-origin_wsh.py: Removed.
            * websocket/tests/frame-length-longer-than-buffer-expected.txt: Removed.
            * websocket/tests/frame-length-longer-than-buffer.html: Removed.
            * websocket/tests/frame-length-longer-than-buffer_wsh.py: Removed.
            * websocket/tests/frame-length-overflow-expected.txt: Removed.
            * websocket/tests/frame-length-overflow.html: Removed.
            * websocket/tests/frame-length-overflow_wsh.py: Removed.
            * websocket/tests/frame-length-skip-expected.txt: Removed.
            * websocket/tests/frame-length-skip.html: Removed.
            * websocket/tests/frame-length-skip_wsh.py: Removed.
            * websocket/tests/frame-lengths-expected.txt: Removed.
            * websocket/tests/frame-lengths.html: Removed.
            * websocket/tests/handler_map.txt: Removed.
            * websocket/tests/handshake-challenge-randomness-expected.txt: Removed.
            * websocket/tests/handshake-challenge-randomness.html: Removed.
            * websocket/tests/handshake-error-expected.txt: Removed.
            * websocket/tests/handshake-error.html: Removed.
            * websocket/tests/handshake-error_wsh.py: Removed.
            * websocket/tests/handshake-fail-by-cross-origin-expected.txt: Removed.
            * websocket/tests/handshake-fail-by-cross-origin.html: Removed.
            * websocket/tests/handshake-fail-by-no-cr-expected.txt: Removed.
            * websocket/tests/handshake-fail-by-no-cr.html: Removed.
            * websocket/tests/handshake-fail-by-no-cr_wsh.py: Removed.
            * websocket/tests/handshake-fail-by-sub-protocol-mismatch-expected.txt: Removed.
            * websocket/tests/handshake-fail-by-sub-protocol-mismatch.html: Removed.
            * websocket/tests/httponly-cookie-expected.txt: Removed.
            * websocket/tests/httponly-cookie.pl: Removed.
            * websocket/tests/long-invalid-header-expected.txt: Removed.
            * websocket/tests/long-invalid-header.html: Removed.
            * websocket/tests/long-invalid-header_wsh.py: Removed.
            * websocket/tests/multiple-connections-expected.txt: Removed.
            * websocket/tests/multiple-connections.html: Removed.
            * websocket/tests/no-query_wsh.py: Removed.
            * websocket/tests/null-character-expected.txt: Removed.
            * websocket/tests/null-character.html: Removed.
            * websocket/tests/origin-test_wsh.py: Removed.
            * websocket/tests/protocol-test_wsh.py: Removed.
            * websocket/tests/reload-crash-expected.txt: Removed.
            * websocket/tests/reload-crash.html: Removed.
            * websocket/tests/resources: Removed.
            * websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html: Removed.
            * websocket/tests/resources/close-on-unload-iframe.html: Removed.
            * websocket/tests/resources/reload-crash-iframe.html: Removed.
            * websocket/tests/script-tests: Removed.
            * websocket/tests/script-tests/TEMPLATE.html: Removed.
            * websocket/tests/script-tests/alert-in-event-handler.js: Removed.
            * websocket/tests/script-tests/bad-handshake-crash.js: Removed.
            * websocket/tests/script-tests/bad-sub-protocol-control-chars.js: Removed.
            * websocket/tests/script-tests/bad-sub-protocol-empty.js: Removed.
            * websocket/tests/script-tests/bad-sub-protocol-non-ascii.js: Removed.
            * websocket/tests/script-tests/bufferedAmount-after-close.js: Removed.
            * websocket/tests/script-tests/cross-origin.js: Removed.
            * websocket/tests/script-tests/error-detect.js: Removed.
            * websocket/tests/script-tests/frame-length-longer-than-buffer.js: Removed.
            * websocket/tests/script-tests/frame-length-skip.js: Removed.
            * websocket/tests/script-tests/handshake-challenge-randomness.js: Removed.
            * websocket/tests/script-tests/handshake-error.js: Removed.
            * websocket/tests/script-tests/handshake-fail-by-cross-origin.js: Removed.
            * websocket/tests/script-tests/handshake-fail-by-no-cr.js: Removed.
            * websocket/tests/script-tests/handshake-fail-by-sub-protocol-mismatch.js: Removed.
            * websocket/tests/script-tests/long-invalid-header.js: Removed.
            * websocket/tests/script-tests/null-character.js: Removed.
            * websocket/tests/script-tests/send-throw.js: Removed.
            * websocket/tests/script-tests/send.js: Removed.
            * websocket/tests/script-tests/simple.js: Removed.
            * websocket/tests/script-tests/sub-protocol-with-space.js: Removed.
            * websocket/tests/script-tests/sub-protocol.js: Removed.
            * websocket/tests/script-tests/unicode.js: Removed.
            * websocket/tests/script-tests/url-no-trailing-slash.js: Removed.
            * websocket/tests/script-tests/url-parsing.js: Removed.
            * websocket/tests/script-tests/url-with-credential.js: Removed.
            * websocket/tests/script-tests/url-with-empty-query.js: Removed.
            * websocket/tests/script-tests/url-with-query-for-no-query.js: Removed.
            * websocket/tests/script-tests/url-with-query.js: Removed.
            * websocket/tests/script-tests/websocket-event-target.js: Removed.
            * websocket/tests/script-tests/websocket-protocol-ignored.js: Removed.
            * websocket/tests/send-after-close-on-unload-expected.txt: Removed.
            * websocket/tests/send-after-close-on-unload.html: Removed.
            * websocket/tests/send-expected.txt: Removed.
            * websocket/tests/send-throw-expected.txt: Removed.
            * websocket/tests/send-throw.html: Removed.
            * websocket/tests/send.html: Removed.
            * websocket/tests/send2_wsh.py: Removed.
            * websocket/tests/send_wsh.py: Removed.
            * websocket/tests/simple-expected.txt: Removed.
            * websocket/tests/simple-stress-expected.txt: Removed.
            * websocket/tests/simple-stress.html: Removed.
            * websocket/tests/simple.html: Removed.
            * websocket/tests/simple_wsh.py: Removed.
            * websocket/tests/sub-protocol-expected.txt: Removed.
            * websocket/tests/sub-protocol-with-space-expected.txt: Removed.
            * websocket/tests/sub-protocol-with-space.html: Removed.
            * websocket/tests/sub-protocol.html: Removed.
            * websocket/tests/unicode-expected.txt: Removed.
            * websocket/tests/unicode.html: Removed.
            * websocket/tests/unicode_wsh.py: Removed.
            * websocket/tests/unknown-frame-type_wsh.py: Removed.
            * websocket/tests/url-no-trailing-slash-expected.txt: Removed.
            * websocket/tests/url-no-trailing-slash.html: Removed.
            * websocket/tests/url-parsing-expected.txt: Removed.
            * websocket/tests/url-parsing.html: Removed.
            * websocket/tests/url-with-credential-expected.txt: Removed.
            * websocket/tests/url-with-credential.html: Removed.
            * websocket/tests/url-with-empty-query-expected.txt: Removed.
            * websocket/tests/url-with-empty-query.html: Removed.
            * websocket/tests/url-with-query-expected.txt: Removed.
            * websocket/tests/url-with-query-for-no-query-expected.txt: Removed.
            * websocket/tests/url-with-query-for-no-query.html: Removed.
            * websocket/tests/url-with-query.html: Removed.
            * websocket/tests/websocket-event-target-expected.txt: Removed.
            * websocket/tests/websocket-event-target.html: Removed.
            * websocket/tests/websocket-pending-activity-expected.txt: Removed.
            * websocket/tests/websocket-pending-activity.html: Removed.
            * websocket/tests/websocket-protocol-ignored-expected.txt: Removed.
            * websocket/tests/websocket-protocol-ignored.html: Removed.
            * websocket/tests/workers: Removed.
            * websocket/tests/workers/close-in-onmessage-crash-expected.txt: Removed.
            * websocket/tests/workers/close-in-onmessage-crash.html: Removed.
            * websocket/tests/workers/close-in-shared-worker-expected.txt: Removed.
            * websocket/tests/workers/close-in-shared-worker.html: Removed.
            * websocket/tests/workers/close-in-worker-expected.txt: Removed.
            * websocket/tests/workers/close-in-worker.html: Removed.
            * websocket/tests/workers/resources: Removed.
            * websocket/tests/workers/resources/close-in-onmessage-crash.js: Removed.
            * websocket/tests/workers/resources/close-in-worker.js: Removed.
            * websocket/tests/workers/resources/echo-challenge_wsh.py: Removed.
            * websocket/tests/workers/resources/echo_wsh.py: Removed.
            * websocket/tests/workers/resources/simple_wsh.py: Removed.
            * websocket/tests/workers/resources/worker-handshake-challenge-randomness.js: Removed.
            * websocket/tests/workers/resources/worker-simple.js: Removed.
            * websocket/tests/workers/shared-worker-simple-expected.txt: Removed.
            * websocket/tests/workers/shared-worker-simple.html: Removed.
            * websocket/tests/workers/worker-handshake-challenge-randomness-expected.txt: Removed.
            * websocket/tests/workers/worker-handshake-challenge-randomness.html: Removed.
            * websocket/tests/workers/worker-simple-expected.txt: Removed.
            * websocket/tests/workers/worker-simple.html: Removed.
    2010-09-30  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            WebSocket tests are flaky
            https://bugs.webkit.org/show_bug.cgi?id=46956
    
            Update these tools to understand how to run the WebSocket tests off the
            Apache server.
    
            * Scripts/old-run-webkit-tests:
            * Scripts/webkitpy/layout_tests/port/base.py:
            * Scripts/webkitpy/layout_tests/port/websocket_server.py:
            * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68914 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7743b7a..25cf30f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,246 @@
+2010-09-30  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        WebSocket tests are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=46956
+
+        Hosting the WebSocket tests using the Python HTTP server causes the
+        tests to time out occationally.  This patch moves the tests to be
+        hosted by the usual Apache server.
+
+        This patch doesn't completely eliminate the flakiness.  However,
+        testing on my local machine shows that it reduces it by a large factor.
+        I suspect there's more flakiness hiding in the Python server, but this
+        patch makes some amount of progress on the issue.
+
+        * http/tests/websocket: Copied from LayoutTests/websocket.
+        * http/tests/websocket/tests/alert-in-event-handler.html:
+        * http/tests/websocket/tests/bad-handshake-crash.html:
+        * http/tests/websocket/tests/bad-sub-protocol-control-chars.html:
+        * http/tests/websocket/tests/bad-sub-protocol-empty.html:
+        * http/tests/websocket/tests/bad-sub-protocol-non-ascii.html:
+        * http/tests/websocket/tests/bufferedAmount-after-close.html:
+        * http/tests/websocket/tests/close-on-navigate-new-location.html:
+        * http/tests/websocket/tests/close-on-unload-and-force-gc.html:
+        * http/tests/websocket/tests/close-on-unload-reference-in-parent.html:
+        * http/tests/websocket/tests/close-on-unload.html:
+        * http/tests/websocket/tests/cross-origin-expected.txt:
+        * http/tests/websocket/tests/cross-origin.html:
+        * http/tests/websocket/tests/error-detect.html:
+        * http/tests/websocket/tests/frame-length-longer-than-buffer.html:
+        * http/tests/websocket/tests/frame-length-overflow.html:
+        * http/tests/websocket/tests/frame-length-skip.html:
+        * http/tests/websocket/tests/handshake-challenge-randomness.html:
+        * http/tests/websocket/tests/handshake-error.html:
+        * http/tests/websocket/tests/handshake-fail-by-cross-origin-expected.txt:
+        * http/tests/websocket/tests/handshake-fail-by-cross-origin.html:
+        * http/tests/websocket/tests/handshake-fail-by-no-cr.html:
+        * http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html:
+        * http/tests/websocket/tests/httponly-cookie.pl:
+        * http/tests/websocket/tests/long-invalid-header.html:
+        * http/tests/websocket/tests/null-character.html:
+        * http/tests/websocket/tests/reload-crash.html:
+        * http/tests/websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html:
+        * http/tests/websocket/tests/resources/close-on-unload-iframe.html:
+        * http/tests/websocket/tests/resources/js-test-post-function.js: Copied from LayoutTests/fast/js/resources/js-test-post-function.js.
+        * http/tests/websocket/tests/resources/js-test-pre.js: Copied from LayoutTests/fast/js/resources/js-test-pre.js.
+        * http/tests/websocket/tests/resources/js-test-style.css: Copied from LayoutTests/fast/js/resources/js-test-style.css.
+        * http/tests/websocket/tests/resources/reload-crash-iframe.html:
+        * http/tests/websocket/tests/script-tests/TEMPLATE.html:
+        * http/tests/websocket/tests/script-tests/cross-origin.js:
+        (endTest):
+        * http/tests/websocket/tests/send-after-close-on-unload.html:
+        * http/tests/websocket/tests/send-throw.html:
+        * http/tests/websocket/tests/send.html:
+        * http/tests/websocket/tests/simple.html:
+        * http/tests/websocket/tests/sub-protocol-with-space.html:
+        * http/tests/websocket/tests/sub-protocol.html:
+        * http/tests/websocket/tests/unicode.html:
+        * http/tests/websocket/tests/url-no-trailing-slash.html:
+        * http/tests/websocket/tests/url-parsing-expected.txt:
+        * http/tests/websocket/tests/url-parsing.html:
+        * http/tests/websocket/tests/url-with-credential.html:
+        * http/tests/websocket/tests/url-with-empty-query.html:
+        * http/tests/websocket/tests/url-with-query-for-no-query.html:
+        * http/tests/websocket/tests/url-with-query.html:
+        * http/tests/websocket/tests/websocket-event-target.html:
+        * http/tests/websocket/tests/websocket-protocol-ignored.html:
+        * platform/chromium-gpu/test_expectations.txt:
+        * platform/chromium/test_expectations.txt:
+        * platform/mac/test_expectations.txt:
+        * platform/win/Skipped:
+        * websocket: Removed.
+        * websocket/resources: Removed.
+        * websocket/resources/server-failed-to-start.html: Removed.
+        * websocket/tests: Removed.
+        * websocket/tests/alert-in-event-handler-expected.txt: Removed.
+        * websocket/tests/alert-in-event-handler.html: Removed.
+        * websocket/tests/bad-handshake-crash-expected.txt: Removed.
+        * websocket/tests/bad-handshake-crash.html: Removed.
+        * websocket/tests/bad-handshake-crash_wsh.py: Removed.
+        * websocket/tests/bad-sub-protocol-control-chars-expected.txt: Removed.
+        * websocket/tests/bad-sub-protocol-control-chars.html: Removed.
+        * websocket/tests/bad-sub-protocol-empty-expected.txt: Removed.
+        * websocket/tests/bad-sub-protocol-empty.html: Removed.
+        * websocket/tests/bad-sub-protocol-non-ascii-expected.txt: Removed.
+        * websocket/tests/bad-sub-protocol-non-ascii.html: Removed.
+        * websocket/tests/bufferedAmount-after-close-expected.txt: Removed.
+        * websocket/tests/bufferedAmount-after-close.html: Removed.
+        * websocket/tests/close-on-navigate-new-location-expected.txt: Removed.
+        * websocket/tests/close-on-navigate-new-location.html: Removed.
+        * websocket/tests/close-on-unload-and-force-gc-expected.txt: Removed.
+        * websocket/tests/close-on-unload-and-force-gc.html: Removed.
+        * websocket/tests/close-on-unload-expected.txt: Removed.
+        * websocket/tests/close-on-unload-reference-in-parent-expected.txt: Removed.
+        * websocket/tests/close-on-unload-reference-in-parent.html: Removed.
+        * websocket/tests/close-on-unload.html: Removed.
+        * websocket/tests/close-on-unload_wsh.py: Removed.
+        * websocket/tests/cross-origin-expected.txt: Removed.
+        * websocket/tests/cross-origin.html: Removed.
+        * websocket/tests/echo-challenge_wsh.py: Removed.
+        * websocket/tests/echo-cookie_wsh.py: Removed.
+        * websocket/tests/echo-location_wsh.py: Removed.
+        * websocket/tests/echo_wsh.py: Removed.
+        * websocket/tests/error-detect-expected.txt: Removed.
+        * websocket/tests/error-detect.html: Removed.
+        * websocket/tests/fixed-origin_wsh.py: Removed.
+        * websocket/tests/frame-length-longer-than-buffer-expected.txt: Removed.
+        * websocket/tests/frame-length-longer-than-buffer.html: Removed.
+        * websocket/tests/frame-length-longer-than-buffer_wsh.py: Removed.
+        * websocket/tests/frame-length-overflow-expected.txt: Removed.
+        * websocket/tests/frame-length-overflow.html: Removed.
+        * websocket/tests/frame-length-overflow_wsh.py: Removed.
+        * websocket/tests/frame-length-skip-expected.txt: Removed.
+        * websocket/tests/frame-length-skip.html: Removed.
+        * websocket/tests/frame-length-skip_wsh.py: Removed.
+        * websocket/tests/frame-lengths-expected.txt: Removed.
+        * websocket/tests/frame-lengths.html: Removed.
+        * websocket/tests/handler_map.txt: Removed.
+        * websocket/tests/handshake-challenge-randomness-expected.txt: Removed.
+        * websocket/tests/handshake-challenge-randomness.html: Removed.
+        * websocket/tests/handshake-error-expected.txt: Removed.
+        * websocket/tests/handshake-error.html: Removed.
+        * websocket/tests/handshake-error_wsh.py: Removed.
+        * websocket/tests/handshake-fail-by-cross-origin-expected.txt: Removed.
+        * websocket/tests/handshake-fail-by-cross-origin.html: Removed.
+        * websocket/tests/handshake-fail-by-no-cr-expected.txt: Removed.
+        * websocket/tests/handshake-fail-by-no-cr.html: Removed.
+        * websocket/tests/handshake-fail-by-no-cr_wsh.py: Removed.
+        * websocket/tests/handshake-fail-by-sub-protocol-mismatch-expected.txt: Removed.
+        * websocket/tests/handshake-fail-by-sub-protocol-mismatch.html: Removed.
+        * websocket/tests/httponly-cookie-expected.txt: Removed.
+        * websocket/tests/httponly-cookie.pl: Removed.
+        * websocket/tests/long-invalid-header-expected.txt: Removed.
+        * websocket/tests/long-invalid-header.html: Removed.
+        * websocket/tests/long-invalid-header_wsh.py: Removed.
+        * websocket/tests/multiple-connections-expected.txt: Removed.
+        * websocket/tests/multiple-connections.html: Removed.
+        * websocket/tests/no-query_wsh.py: Removed.
+        * websocket/tests/null-character-expected.txt: Removed.
+        * websocket/tests/null-character.html: Removed.
+        * websocket/tests/origin-test_wsh.py: Removed.
+        * websocket/tests/protocol-test_wsh.py: Removed.
+        * websocket/tests/reload-crash-expected.txt: Removed.
+        * websocket/tests/reload-crash.html: Removed.
+        * websocket/tests/resources: Removed.
+        * websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html: Removed.
+        * websocket/tests/resources/close-on-unload-iframe.html: Removed.
+        * websocket/tests/resources/reload-crash-iframe.html: Removed.
+        * websocket/tests/script-tests: Removed.
+        * websocket/tests/script-tests/TEMPLATE.html: Removed.
+        * websocket/tests/script-tests/alert-in-event-handler.js: Removed.
+        * websocket/tests/script-tests/bad-handshake-crash.js: Removed.
+        * websocket/tests/script-tests/bad-sub-protocol-control-chars.js: Removed.
+        * websocket/tests/script-tests/bad-sub-protocol-empty.js: Removed.
+        * websocket/tests/script-tests/bad-sub-protocol-non-ascii.js: Removed.
+        * websocket/tests/script-tests/bufferedAmount-after-close.js: Removed.
+        * websocket/tests/script-tests/cross-origin.js: Removed.
+        * websocket/tests/script-tests/error-detect.js: Removed.
+        * websocket/tests/script-tests/frame-length-longer-than-buffer.js: Removed.
+        * websocket/tests/script-tests/frame-length-skip.js: Removed.
+        * websocket/tests/script-tests/handshake-challenge-randomness.js: Removed.
+        * websocket/tests/script-tests/handshake-error.js: Removed.
+        * websocket/tests/script-tests/handshake-fail-by-cross-origin.js: Removed.
+        * websocket/tests/script-tests/handshake-fail-by-no-cr.js: Removed.
+        * websocket/tests/script-tests/handshake-fail-by-sub-protocol-mismatch.js: Removed.
+        * websocket/tests/script-tests/long-invalid-header.js: Removed.
+        * websocket/tests/script-tests/null-character.js: Removed.
+        * websocket/tests/script-tests/send-throw.js: Removed.
+        * websocket/tests/script-tests/send.js: Removed.
+        * websocket/tests/script-tests/simple.js: Removed.
+        * websocket/tests/script-tests/sub-protocol-with-space.js: Removed.
+        * websocket/tests/script-tests/sub-protocol.js: Removed.
+        * websocket/tests/script-tests/unicode.js: Removed.
+        * websocket/tests/script-tests/url-no-trailing-slash.js: Removed.
+        * websocket/tests/script-tests/url-parsing.js: Removed.
+        * websocket/tests/script-tests/url-with-credential.js: Removed.
+        * websocket/tests/script-tests/url-with-empty-query.js: Removed.
+        * websocket/tests/script-tests/url-with-query-for-no-query.js: Removed.
+        * websocket/tests/script-tests/url-with-query.js: Removed.
+        * websocket/tests/script-tests/websocket-event-target.js: Removed.
+        * websocket/tests/script-tests/websocket-protocol-ignored.js: Removed.
+        * websocket/tests/send-after-close-on-unload-expected.txt: Removed.
+        * websocket/tests/send-after-close-on-unload.html: Removed.
+        * websocket/tests/send-expected.txt: Removed.
+        * websocket/tests/send-throw-expected.txt: Removed.
+        * websocket/tests/send-throw.html: Removed.
+        * websocket/tests/send.html: Removed.
+        * websocket/tests/send2_wsh.py: Removed.
+        * websocket/tests/send_wsh.py: Removed.
+        * websocket/tests/simple-expected.txt: Removed.
+        * websocket/tests/simple-stress-expected.txt: Removed.
+        * websocket/tests/simple-stress.html: Removed.
+        * websocket/tests/simple.html: Removed.
+        * websocket/tests/simple_wsh.py: Removed.
+        * websocket/tests/sub-protocol-expected.txt: Removed.
+        * websocket/tests/sub-protocol-with-space-expected.txt: Removed.
+        * websocket/tests/sub-protocol-with-space.html: Removed.
+        * websocket/tests/sub-protocol.html: Removed.
+        * websocket/tests/unicode-expected.txt: Removed.
+        * websocket/tests/unicode.html: Removed.
+        * websocket/tests/unicode_wsh.py: Removed.
+        * websocket/tests/unknown-frame-type_wsh.py: Removed.
+        * websocket/tests/url-no-trailing-slash-expected.txt: Removed.
+        * websocket/tests/url-no-trailing-slash.html: Removed.
+        * websocket/tests/url-parsing-expected.txt: Removed.
+        * websocket/tests/url-parsing.html: Removed.
+        * websocket/tests/url-with-credential-expected.txt: Removed.
+        * websocket/tests/url-with-credential.html: Removed.
+        * websocket/tests/url-with-empty-query-expected.txt: Removed.
+        * websocket/tests/url-with-empty-query.html: Removed.
+        * websocket/tests/url-with-query-expected.txt: Removed.
+        * websocket/tests/url-with-query-for-no-query-expected.txt: Removed.
+        * websocket/tests/url-with-query-for-no-query.html: Removed.
+        * websocket/tests/url-with-query.html: Removed.
+        * websocket/tests/websocket-event-target-expected.txt: Removed.
+        * websocket/tests/websocket-event-target.html: Removed.
+        * websocket/tests/websocket-pending-activity-expected.txt: Removed.
+        * websocket/tests/websocket-pending-activity.html: Removed.
+        * websocket/tests/websocket-protocol-ignored-expected.txt: Removed.
+        * websocket/tests/websocket-protocol-ignored.html: Removed.
+        * websocket/tests/workers: Removed.
+        * websocket/tests/workers/close-in-onmessage-crash-expected.txt: Removed.
+        * websocket/tests/workers/close-in-onmessage-crash.html: Removed.
+        * websocket/tests/workers/close-in-shared-worker-expected.txt: Removed.
+        * websocket/tests/workers/close-in-shared-worker.html: Removed.
+        * websocket/tests/workers/close-in-worker-expected.txt: Removed.
+        * websocket/tests/workers/close-in-worker.html: Removed.
+        * websocket/tests/workers/resources: Removed.
+        * websocket/tests/workers/resources/close-in-onmessage-crash.js: Removed.
+        * websocket/tests/workers/resources/close-in-worker.js: Removed.
+        * websocket/tests/workers/resources/echo-challenge_wsh.py: Removed.
+        * websocket/tests/workers/resources/echo_wsh.py: Removed.
+        * websocket/tests/workers/resources/simple_wsh.py: Removed.
+        * websocket/tests/workers/resources/worker-handshake-challenge-randomness.js: Removed.
+        * websocket/tests/workers/resources/worker-simple.js: Removed.
+        * websocket/tests/workers/shared-worker-simple-expected.txt: Removed.
+        * websocket/tests/workers/shared-worker-simple.html: Removed.
+        * websocket/tests/workers/worker-handshake-challenge-randomness-expected.txt: Removed.
+        * websocket/tests/workers/worker-handshake-challenge-randomness.html: Removed.
+        * websocket/tests/workers/worker-simple-expected.txt: Removed.
+        * websocket/tests/workers/worker-simple.html: Removed.
+
 2010-10-01  Alpha Lam  <hclam at chromium.org>
 
         Not reviewed. Build fix.
diff --git a/LayoutTests/websocket/resources/server-failed-to-start.html b/LayoutTests/http/tests/websocket/resources/server-failed-to-start.html
similarity index 100%
rename from LayoutTests/websocket/resources/server-failed-to-start.html
rename to LayoutTests/http/tests/websocket/resources/server-failed-to-start.html
diff --git a/LayoutTests/websocket/tests/alert-in-event-handler-expected.txt b/LayoutTests/http/tests/websocket/tests/alert-in-event-handler-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/alert-in-event-handler-expected.txt
rename to LayoutTests/http/tests/websocket/tests/alert-in-event-handler-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/alert-in-event-handler.html b/LayoutTests/http/tests/websocket/tests/alert-in-event-handler.html
new file mode 100644
index 0000000..b80c165
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/alert-in-event-handler.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/alert-in-event-handler.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/bad-handshake-crash-expected.txt b/LayoutTests/http/tests/websocket/tests/bad-handshake-crash-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/bad-handshake-crash-expected.txt
rename to LayoutTests/http/tests/websocket/tests/bad-handshake-crash-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/bad-handshake-crash.html b/LayoutTests/http/tests/websocket/tests/bad-handshake-crash.html
new file mode 100644
index 0000000..3e35c25
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/bad-handshake-crash.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/bad-handshake-crash.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/bad-handshake-crash_wsh.py b/LayoutTests/http/tests/websocket/tests/bad-handshake-crash_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/bad-handshake-crash_wsh.py
rename to LayoutTests/http/tests/websocket/tests/bad-handshake-crash_wsh.py
diff --git a/LayoutTests/websocket/tests/bad-sub-protocol-control-chars-expected.txt b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-control-chars-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/bad-sub-protocol-control-chars-expected.txt
rename to LayoutTests/http/tests/websocket/tests/bad-sub-protocol-control-chars-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-control-chars.html b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-control-chars.html
new file mode 100644
index 0000000..eda68f5
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-control-chars.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/bad-sub-protocol-control-chars.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/bad-sub-protocol-empty-expected.txt b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-empty-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/bad-sub-protocol-empty-expected.txt
rename to LayoutTests/http/tests/websocket/tests/bad-sub-protocol-empty-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-empty.html b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-empty.html
new file mode 100644
index 0000000..d945a1a
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-empty.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/bad-sub-protocol-empty.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/bad-sub-protocol-non-ascii-expected.txt b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-non-ascii-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/bad-sub-protocol-non-ascii-expected.txt
rename to LayoutTests/http/tests/websocket/tests/bad-sub-protocol-non-ascii-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-non-ascii.html b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-non-ascii.html
new file mode 100644
index 0000000..ef02b48
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/bad-sub-protocol-non-ascii.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/bad-sub-protocol-non-ascii.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/bufferedAmount-after-close-expected.txt b/LayoutTests/http/tests/websocket/tests/bufferedAmount-after-close-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/bufferedAmount-after-close-expected.txt
rename to LayoutTests/http/tests/websocket/tests/bufferedAmount-after-close-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/bufferedAmount-after-close.html b/LayoutTests/http/tests/websocket/tests/bufferedAmount-after-close.html
new file mode 100644
index 0000000..ed9d6d0
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/bufferedAmount-after-close.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/bufferedAmount-after-close.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/close-on-navigate-new-location-expected.txt b/LayoutTests/http/tests/websocket/tests/close-on-navigate-new-location-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/close-on-navigate-new-location-expected.txt
rename to LayoutTests/http/tests/websocket/tests/close-on-navigate-new-location-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/close-on-navigate-new-location.html b/LayoutTests/http/tests/websocket/tests/close-on-navigate-new-location.html
new file mode 100644
index 0000000..fcedac0
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/close-on-navigate-new-location.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.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.");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+var frameDiv;
+var closedSocket;
+
+function endTest()
+{
+    shouldBe("closedSocket", '"socket1"');
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+};
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
+{
+    endTest();
+};
+
+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";
+};
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/close-on-unload-and-force-gc-expected.txt b/LayoutTests/http/tests/websocket/tests/close-on-unload-and-force-gc-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/close-on-unload-and-force-gc-expected.txt
rename to LayoutTests/http/tests/websocket/tests/close-on-unload-and-force-gc-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/close-on-unload-and-force-gc.html b/LayoutTests/http/tests/websocket/tests/close-on-unload-and-force-gc.html
new file mode 100644
index 0000000..57e6452
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/close-on-unload-and-force-gc.html
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.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");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+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");
+    }
+};
+
+var frameDiv;
+var closedSocket;
+
+function endTest()
+{
+    shouldBe("closedSocket", '"socket1"');
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+};
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
+{
+    endTest();
+};
+
+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();
+};
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/close-on-unload-expected.txt b/LayoutTests/http/tests/websocket/tests/close-on-unload-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/close-on-unload-expected.txt
rename to LayoutTests/http/tests/websocket/tests/close-on-unload-expected.txt
diff --git a/LayoutTests/websocket/tests/close-on-unload-reference-in-parent-expected.txt b/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/close-on-unload-reference-in-parent-expected.txt
rename to LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent.html b/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent.html
new file mode 100644
index 0000000..f919ffb
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/close-on-unload-reference-in-parent.html
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.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.");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+var frameDiv;
+var closedSocket;
+document.childWebSocket = null;
+
+function endTest()
+{
+    shouldBe("closedSocket", '"socket1"');
+    shouldBe("document.childWebSocket.readyState", "2");
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+};
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
+{
+    endTest();
+};
+
+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);
+};
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/http/tests/websocket/tests/close-on-unload.html b/LayoutTests/http/tests/websocket/tests/close-on-unload.html
new file mode 100644
index 0000000..006e115
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/close-on-unload.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.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");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+var frameDiv;
+var closedSocket;
+
+function endTest()
+{
+    shouldBe("closedSocket", '"socket1"');
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+};
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
+{
+    endTest();
+};
+
+document.iframeReady = function()
+{
+    debug("PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...");
+    document.body.removeChild(frameDiv);
+}; 
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/close-on-unload_wsh.py b/LayoutTests/http/tests/websocket/tests/close-on-unload_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/close-on-unload_wsh.py
rename to LayoutTests/http/tests/websocket/tests/close-on-unload_wsh.py
diff --git a/LayoutTests/http/tests/websocket/tests/cross-origin-expected.txt b/LayoutTests/http/tests/websocket/tests/cross-origin-expected.txt
new file mode 100644
index 0000000..ad3e1e6
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/cross-origin-expected.txt
@@ -0,0 +1,12 @@
+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/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/cross-origin.html b/LayoutTests/http/tests/websocket/tests/cross-origin.html
new file mode 100644
index 0000000..de6fc49
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/cross-origin.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/cross-origin.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/echo-challenge_wsh.py b/LayoutTests/http/tests/websocket/tests/echo-challenge_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/echo-challenge_wsh.py
rename to LayoutTests/http/tests/websocket/tests/echo-challenge_wsh.py
diff --git a/LayoutTests/websocket/tests/echo-cookie_wsh.py b/LayoutTests/http/tests/websocket/tests/echo-cookie_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/echo-cookie_wsh.py
rename to LayoutTests/http/tests/websocket/tests/echo-cookie_wsh.py
diff --git a/LayoutTests/websocket/tests/echo-location_wsh.py b/LayoutTests/http/tests/websocket/tests/echo-location_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/echo-location_wsh.py
rename to LayoutTests/http/tests/websocket/tests/echo-location_wsh.py
diff --git a/LayoutTests/websocket/tests/echo_wsh.py b/LayoutTests/http/tests/websocket/tests/echo_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/echo_wsh.py
rename to LayoutTests/http/tests/websocket/tests/echo_wsh.py
diff --git a/LayoutTests/websocket/tests/error-detect-expected.txt b/LayoutTests/http/tests/websocket/tests/error-detect-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/error-detect-expected.txt
rename to LayoutTests/http/tests/websocket/tests/error-detect-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/error-detect.html b/LayoutTests/http/tests/websocket/tests/error-detect.html
new file mode 100644
index 0000000..5be6b37
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/error-detect.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/error-detect.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/fixed-origin_wsh.py b/LayoutTests/http/tests/websocket/tests/fixed-origin_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/fixed-origin_wsh.py
rename to LayoutTests/http/tests/websocket/tests/fixed-origin_wsh.py
diff --git a/LayoutTests/websocket/tests/frame-length-longer-than-buffer-expected.txt b/LayoutTests/http/tests/websocket/tests/frame-length-longer-than-buffer-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/frame-length-longer-than-buffer-expected.txt
rename to LayoutTests/http/tests/websocket/tests/frame-length-longer-than-buffer-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/frame-length-longer-than-buffer.html b/LayoutTests/http/tests/websocket/tests/frame-length-longer-than-buffer.html
new file mode 100644
index 0000000..7770f1c
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/frame-length-longer-than-buffer.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/frame-length-longer-than-buffer.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/frame-length-longer-than-buffer_wsh.py b/LayoutTests/http/tests/websocket/tests/frame-length-longer-than-buffer_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/frame-length-longer-than-buffer_wsh.py
rename to LayoutTests/http/tests/websocket/tests/frame-length-longer-than-buffer_wsh.py
diff --git a/LayoutTests/websocket/tests/frame-length-overflow-expected.txt b/LayoutTests/http/tests/websocket/tests/frame-length-overflow-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/frame-length-overflow-expected.txt
rename to LayoutTests/http/tests/websocket/tests/frame-length-overflow-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/frame-length-overflow.html b/LayoutTests/http/tests/websocket/tests/frame-length-overflow.html
new file mode 100644
index 0000000..6fb0e28
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/frame-length-overflow.html
@@ -0,0 +1,38 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.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");
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+function finish() {
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+}
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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");
+    finish();
+};
+
+var successfullyParsed = true;
+</script>
+
diff --git a/LayoutTests/websocket/tests/frame-length-overflow_wsh.py b/LayoutTests/http/tests/websocket/tests/frame-length-overflow_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/frame-length-overflow_wsh.py
rename to LayoutTests/http/tests/websocket/tests/frame-length-overflow_wsh.py
diff --git a/LayoutTests/websocket/tests/frame-length-skip-expected.txt b/LayoutTests/http/tests/websocket/tests/frame-length-skip-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/frame-length-skip-expected.txt
rename to LayoutTests/http/tests/websocket/tests/frame-length-skip-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/frame-length-skip.html b/LayoutTests/http/tests/websocket/tests/frame-length-skip.html
new file mode 100644
index 0000000..e0827c6
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/frame-length-skip.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/frame-length-skip.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/frame-length-skip_wsh.py b/LayoutTests/http/tests/websocket/tests/frame-length-skip_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/frame-length-skip_wsh.py
rename to LayoutTests/http/tests/websocket/tests/frame-length-skip_wsh.py
diff --git a/LayoutTests/websocket/tests/frame-lengths-expected.txt b/LayoutTests/http/tests/websocket/tests/frame-lengths-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/frame-lengths-expected.txt
rename to LayoutTests/http/tests/websocket/tests/frame-lengths-expected.txt
diff --git a/LayoutTests/websocket/tests/frame-lengths.html b/LayoutTests/http/tests/websocket/tests/frame-lengths.html
similarity index 100%
rename from LayoutTests/websocket/tests/frame-lengths.html
rename to LayoutTests/http/tests/websocket/tests/frame-lengths.html
diff --git a/LayoutTests/websocket/tests/handler_map.txt b/LayoutTests/http/tests/websocket/tests/handler_map.txt
similarity index 100%
rename from LayoutTests/websocket/tests/handler_map.txt
rename to LayoutTests/http/tests/websocket/tests/handler_map.txt
diff --git a/LayoutTests/websocket/tests/handshake-challenge-randomness-expected.txt b/LayoutTests/http/tests/websocket/tests/handshake-challenge-randomness-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/handshake-challenge-randomness-expected.txt
rename to LayoutTests/http/tests/websocket/tests/handshake-challenge-randomness-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/handshake-challenge-randomness.html b/LayoutTests/http/tests/websocket/tests/handshake-challenge-randomness.html
new file mode 100644
index 0000000..e29f2b7
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/handshake-challenge-randomness.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/handshake-challenge-randomness.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/handshake-error-expected.txt b/LayoutTests/http/tests/websocket/tests/handshake-error-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/handshake-error-expected.txt
rename to LayoutTests/http/tests/websocket/tests/handshake-error-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/handshake-error.html b/LayoutTests/http/tests/websocket/tests/handshake-error.html
new file mode 100644
index 0000000..595368d
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/handshake-error.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/handshake-error.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/handshake-error_wsh.py b/LayoutTests/http/tests/websocket/tests/handshake-error_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/handshake-error_wsh.py
rename to LayoutTests/http/tests/websocket/tests/handshake-error_wsh.py
diff --git a/LayoutTests/http/tests/websocket/tests/handshake-fail-by-cross-origin-expected.txt b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-cross-origin-expected.txt
new file mode 100644
index 0000000..251d19b
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-cross-origin-expected.txt
@@ -0,0 +1,13 @@
+CONSOLE MESSAGE: line 0: 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/fixed-origin
+PASS connected is false
+PASS origin is undefined.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/http/tests/websocket/tests/handshake-fail-by-cross-origin.html b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-cross-origin.html
new file mode 100644
index 0000000..3c66de9
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-cross-origin.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/handshake-fail-by-cross-origin.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/handshake-fail-by-no-cr-expected.txt b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-cr-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/handshake-fail-by-no-cr-expected.txt
rename to LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-cr-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-cr.html b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-cr.html
new file mode 100644
index 0000000..4741202
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-cr.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/handshake-fail-by-no-cr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/handshake-fail-by-no-cr_wsh.py b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-cr_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/handshake-fail-by-no-cr_wsh.py
rename to LayoutTests/http/tests/websocket/tests/handshake-fail-by-no-cr_wsh.py
diff --git a/LayoutTests/websocket/tests/handshake-fail-by-sub-protocol-mismatch-expected.txt b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/handshake-fail-by-sub-protocol-mismatch-expected.txt
rename to LayoutTests/http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html
new file mode 100644
index 0000000..d8ae231
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/handshake-fail-by-sub-protocol-mismatch.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/httponly-cookie-expected.txt b/LayoutTests/http/tests/websocket/tests/httponly-cookie-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/httponly-cookie-expected.txt
rename to LayoutTests/http/tests/websocket/tests/httponly-cookie-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/httponly-cookie.pl b/LayoutTests/http/tests/websocket/tests/httponly-cookie.pl
new file mode 100755
index 0000000..f713a1b
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/httponly-cookie.pl
@@ -0,0 +1,59 @@
+#!/usr/bin/perl -wT
+use strict;
+
+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>
+<script src="../../../js-test-resources/js-test-post-function.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>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+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 endTest()
+{
+    cookie = normalizeCookie(cookie);
+    shouldBe("cookie", '"WK-websocket-test-httponly=1; WK-websocket-test=1"');
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+       layoutTestController.notifyDone();
+}
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/echo-cookie");
+ws.onopen = function() {
+    debug("WebSocket open");
+};
+ws.onmessage = function(evt) {
+    cookie = evt.data;
+    ws.close();
+};
+ws.onclose = function() {
+    debug("WebSocket closed");
+    endTest();
+};
+
+var successfullyParsed = true;
+</script>
+</body>
+</html>
+HTML
diff --git a/LayoutTests/websocket/tests/long-invalid-header-expected.txt b/LayoutTests/http/tests/websocket/tests/long-invalid-header-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/long-invalid-header-expected.txt
rename to LayoutTests/http/tests/websocket/tests/long-invalid-header-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/long-invalid-header.html b/LayoutTests/http/tests/websocket/tests/long-invalid-header.html
new file mode 100644
index 0000000..2416c1e
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/long-invalid-header.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/long-invalid-header.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/long-invalid-header_wsh.py b/LayoutTests/http/tests/websocket/tests/long-invalid-header_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/long-invalid-header_wsh.py
rename to LayoutTests/http/tests/websocket/tests/long-invalid-header_wsh.py
diff --git a/LayoutTests/websocket/tests/multiple-connections-expected.txt b/LayoutTests/http/tests/websocket/tests/multiple-connections-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/multiple-connections-expected.txt
rename to LayoutTests/http/tests/websocket/tests/multiple-connections-expected.txt
diff --git a/LayoutTests/websocket/tests/multiple-connections.html b/LayoutTests/http/tests/websocket/tests/multiple-connections.html
similarity index 100%
rename from LayoutTests/websocket/tests/multiple-connections.html
rename to LayoutTests/http/tests/websocket/tests/multiple-connections.html
diff --git a/LayoutTests/websocket/tests/no-query_wsh.py b/LayoutTests/http/tests/websocket/tests/no-query_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/no-query_wsh.py
rename to LayoutTests/http/tests/websocket/tests/no-query_wsh.py
diff --git a/LayoutTests/websocket/tests/null-character-expected.txt b/LayoutTests/http/tests/websocket/tests/null-character-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/null-character-expected.txt
rename to LayoutTests/http/tests/websocket/tests/null-character-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/null-character.html b/LayoutTests/http/tests/websocket/tests/null-character.html
new file mode 100644
index 0000000..954456c
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/null-character.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/null-character.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/origin-test_wsh.py b/LayoutTests/http/tests/websocket/tests/origin-test_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/origin-test_wsh.py
rename to LayoutTests/http/tests/websocket/tests/origin-test_wsh.py
diff --git a/LayoutTests/websocket/tests/protocol-test_wsh.py b/LayoutTests/http/tests/websocket/tests/protocol-test_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/protocol-test_wsh.py
rename to LayoutTests/http/tests/websocket/tests/protocol-test_wsh.py
diff --git a/LayoutTests/websocket/tests/reload-crash-expected.txt b/LayoutTests/http/tests/websocket/tests/reload-crash-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/reload-crash-expected.txt
rename to LayoutTests/http/tests/websocket/tests/reload-crash-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/reload-crash.html b/LayoutTests/http/tests/websocket/tests/reload-crash.html
new file mode 100644
index 0000000..fbf3d29
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/reload-crash.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.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");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+var frameDiv;
+var reloadCount = 0;
+
+function endTest()
+{
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+};
+
+document.iframeReady = function ()
+{
+    if (reloadCount == 0)
+       debug("PASS iframe is ready.");
+    if (reloadCount == 1) {
+       debug("PASS reloaded iframe while WebSocket is busy");
+       endTest();
+       return;
+    }
+    reloadCount += 1;
+};
+
+frameDiv = document.createElement("iframe");
+frameDiv.src = "resources/reload-crash-iframe.html";
+document.body.appendChild(frameDiv);
+debug("PASS insert a iframe");
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/http/tests/websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html b/LayoutTests/http/tests/websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html
new file mode 100644
index 0000000..0604903
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<script src="../../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../../js-test-resources/js-test-post-function.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/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/resources/close-on-unload-iframe.html b/LayoutTests/http/tests/websocket/tests/resources/close-on-unload-iframe.html
new file mode 100644
index 0000000..c6646a8
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/resources/close-on-unload-iframe.html
@@ -0,0 +1,23 @@
+<html>
+<head>
+<script src="../../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../../js-test-resources/js-test-post-function.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/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/resources/reload-crash-iframe.html b/LayoutTests/http/tests/websocket/tests/resources/reload-crash-iframe.html
new file mode 100644
index 0000000..5107da0
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/resources/reload-crash-iframe.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script src="../../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script type="text/javascript">
+parent.document.iframeReady();
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/close-on-unload");
+location.reload();
+</script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/websocket/tests/script-tests/TEMPLATE.html b/LayoutTests/http/tests/websocket/tests/script-tests/TEMPLATE.html
new file mode 100644
index 0000000..5ba721e
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/script-tests/TEMPLATE.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/script-tests/alert-in-event-handler.js b/LayoutTests/http/tests/websocket/tests/script-tests/alert-in-event-handler.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/alert-in-event-handler.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/alert-in-event-handler.js
diff --git a/LayoutTests/websocket/tests/script-tests/bad-handshake-crash.js b/LayoutTests/http/tests/websocket/tests/script-tests/bad-handshake-crash.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/bad-handshake-crash.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/bad-handshake-crash.js
diff --git a/LayoutTests/websocket/tests/script-tests/bad-sub-protocol-control-chars.js b/LayoutTests/http/tests/websocket/tests/script-tests/bad-sub-protocol-control-chars.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/bad-sub-protocol-control-chars.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/bad-sub-protocol-control-chars.js
diff --git a/LayoutTests/websocket/tests/script-tests/bad-sub-protocol-empty.js b/LayoutTests/http/tests/websocket/tests/script-tests/bad-sub-protocol-empty.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/bad-sub-protocol-empty.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/bad-sub-protocol-empty.js
diff --git a/LayoutTests/websocket/tests/script-tests/bad-sub-protocol-non-ascii.js b/LayoutTests/http/tests/websocket/tests/script-tests/bad-sub-protocol-non-ascii.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/bad-sub-protocol-non-ascii.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/bad-sub-protocol-non-ascii.js
diff --git a/LayoutTests/websocket/tests/script-tests/bufferedAmount-after-close.js b/LayoutTests/http/tests/websocket/tests/script-tests/bufferedAmount-after-close.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/bufferedAmount-after-close.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/bufferedAmount-after-close.js
diff --git a/LayoutTests/http/tests/websocket/tests/script-tests/cross-origin.js b/LayoutTests/http/tests/websocket/tests/script-tests/cross-origin.js
new file mode 100644
index 0000000..81891ad
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/script-tests/cross-origin.js
@@ -0,0 +1,46 @@
+description("Web Socket Cross Origin test");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+var origin;
+
+function endTest()
+{
+    shouldBe("origin", '"http://127.0.0.1:8000"');
+    clearTimeout(timeoutID);
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+}
+
+var url = "ws://localhost:8880/websocket/tests/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);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/websocket/tests/script-tests/error-detect.js b/LayoutTests/http/tests/websocket/tests/script-tests/error-detect.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/error-detect.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/error-detect.js
diff --git a/LayoutTests/websocket/tests/script-tests/frame-length-longer-than-buffer.js b/LayoutTests/http/tests/websocket/tests/script-tests/frame-length-longer-than-buffer.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/frame-length-longer-than-buffer.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/frame-length-longer-than-buffer.js
diff --git a/LayoutTests/websocket/tests/script-tests/frame-length-skip.js b/LayoutTests/http/tests/websocket/tests/script-tests/frame-length-skip.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/frame-length-skip.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/frame-length-skip.js
diff --git a/LayoutTests/websocket/tests/script-tests/handshake-challenge-randomness.js b/LayoutTests/http/tests/websocket/tests/script-tests/handshake-challenge-randomness.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/handshake-challenge-randomness.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/handshake-challenge-randomness.js
diff --git a/LayoutTests/websocket/tests/script-tests/handshake-error.js b/LayoutTests/http/tests/websocket/tests/script-tests/handshake-error.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/handshake-error.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/handshake-error.js
diff --git a/LayoutTests/websocket/tests/script-tests/handshake-fail-by-cross-origin.js b/LayoutTests/http/tests/websocket/tests/script-tests/handshake-fail-by-cross-origin.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/handshake-fail-by-cross-origin.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/handshake-fail-by-cross-origin.js
diff --git a/LayoutTests/websocket/tests/script-tests/handshake-fail-by-no-cr.js b/LayoutTests/http/tests/websocket/tests/script-tests/handshake-fail-by-no-cr.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/handshake-fail-by-no-cr.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/handshake-fail-by-no-cr.js
diff --git a/LayoutTests/websocket/tests/script-tests/handshake-fail-by-sub-protocol-mismatch.js b/LayoutTests/http/tests/websocket/tests/script-tests/handshake-fail-by-sub-protocol-mismatch.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/handshake-fail-by-sub-protocol-mismatch.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/handshake-fail-by-sub-protocol-mismatch.js
diff --git a/LayoutTests/websocket/tests/script-tests/long-invalid-header.js b/LayoutTests/http/tests/websocket/tests/script-tests/long-invalid-header.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/long-invalid-header.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/long-invalid-header.js
diff --git a/LayoutTests/websocket/tests/script-tests/null-character.js b/LayoutTests/http/tests/websocket/tests/script-tests/null-character.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/null-character.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/null-character.js
diff --git a/LayoutTests/websocket/tests/script-tests/send-throw.js b/LayoutTests/http/tests/websocket/tests/script-tests/send-throw.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/send-throw.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/send-throw.js
diff --git a/LayoutTests/websocket/tests/script-tests/send.js b/LayoutTests/http/tests/websocket/tests/script-tests/send.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/send.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/send.js
diff --git a/LayoutTests/websocket/tests/script-tests/simple.js b/LayoutTests/http/tests/websocket/tests/script-tests/simple.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/simple.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/simple.js
diff --git a/LayoutTests/websocket/tests/script-tests/sub-protocol-with-space.js b/LayoutTests/http/tests/websocket/tests/script-tests/sub-protocol-with-space.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/sub-protocol-with-space.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/sub-protocol-with-space.js
diff --git a/LayoutTests/websocket/tests/script-tests/sub-protocol.js b/LayoutTests/http/tests/websocket/tests/script-tests/sub-protocol.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/sub-protocol.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/sub-protocol.js
diff --git a/LayoutTests/websocket/tests/script-tests/unicode.js b/LayoutTests/http/tests/websocket/tests/script-tests/unicode.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/unicode.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/unicode.js
diff --git a/LayoutTests/websocket/tests/script-tests/url-no-trailing-slash.js b/LayoutTests/http/tests/websocket/tests/script-tests/url-no-trailing-slash.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/url-no-trailing-slash.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/url-no-trailing-slash.js
diff --git a/LayoutTests/websocket/tests/script-tests/url-parsing.js b/LayoutTests/http/tests/websocket/tests/script-tests/url-parsing.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/url-parsing.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/url-parsing.js
diff --git a/LayoutTests/websocket/tests/script-tests/url-with-credential.js b/LayoutTests/http/tests/websocket/tests/script-tests/url-with-credential.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/url-with-credential.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/url-with-credential.js
diff --git a/LayoutTests/websocket/tests/script-tests/url-with-empty-query.js b/LayoutTests/http/tests/websocket/tests/script-tests/url-with-empty-query.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/url-with-empty-query.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/url-with-empty-query.js
diff --git a/LayoutTests/websocket/tests/script-tests/url-with-query-for-no-query.js b/LayoutTests/http/tests/websocket/tests/script-tests/url-with-query-for-no-query.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/url-with-query-for-no-query.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/url-with-query-for-no-query.js
diff --git a/LayoutTests/websocket/tests/script-tests/url-with-query.js b/LayoutTests/http/tests/websocket/tests/script-tests/url-with-query.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/url-with-query.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/url-with-query.js
diff --git a/LayoutTests/websocket/tests/script-tests/websocket-event-target.js b/LayoutTests/http/tests/websocket/tests/script-tests/websocket-event-target.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/websocket-event-target.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/websocket-event-target.js
diff --git a/LayoutTests/websocket/tests/script-tests/websocket-protocol-ignored.js b/LayoutTests/http/tests/websocket/tests/script-tests/websocket-protocol-ignored.js
similarity index 100%
rename from LayoutTests/websocket/tests/script-tests/websocket-protocol-ignored.js
rename to LayoutTests/http/tests/websocket/tests/script-tests/websocket-protocol-ignored.js
diff --git a/LayoutTests/websocket/tests/send-after-close-on-unload-expected.txt b/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/send-after-close-on-unload-expected.txt
rename to LayoutTests/http/tests/websocket/tests/send-after-close-on-unload-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload.html b/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload.html
new file mode 100644
index 0000000..c49f8d1
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/send-after-close-on-unload.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.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.");
+
+if (window.layoutTestController)
+    layoutTestController.waitUntilDone();
+
+var frameDiv;
+var closedSocket;
+document.childWebSocket = null;
+
+function endTest()
+{
+    shouldBe("closedSocket", '"socket1"');
+    shouldBe("document.childWebSocket.readyState", "2");
+    isSuccessfullyParsed();
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+};
+
+var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
+{
+    endTest();
+};
+
+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')");
+};
+
+var successfullyParsed = true;
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/send-expected.txt b/LayoutTests/http/tests/websocket/tests/send-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/send-expected.txt
rename to LayoutTests/http/tests/websocket/tests/send-expected.txt
diff --git a/LayoutTests/websocket/tests/send-throw-expected.txt b/LayoutTests/http/tests/websocket/tests/send-throw-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/send-throw-expected.txt
rename to LayoutTests/http/tests/websocket/tests/send-throw-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/send-throw.html b/LayoutTests/http/tests/websocket/tests/send-throw.html
new file mode 100644
index 0000000..5a44be7
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/send-throw.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/send-throw.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/websocket/tests/send.html b/LayoutTests/http/tests/websocket/tests/send.html
new file mode 100644
index 0000000..295bdd6
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/send.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/send.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/send2_wsh.py b/LayoutTests/http/tests/websocket/tests/send2_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/send2_wsh.py
rename to LayoutTests/http/tests/websocket/tests/send2_wsh.py
diff --git a/LayoutTests/websocket/tests/send_wsh.py b/LayoutTests/http/tests/websocket/tests/send_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/send_wsh.py
rename to LayoutTests/http/tests/websocket/tests/send_wsh.py
diff --git a/LayoutTests/websocket/tests/simple-expected.txt b/LayoutTests/http/tests/websocket/tests/simple-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/simple-expected.txt
rename to LayoutTests/http/tests/websocket/tests/simple-expected.txt
diff --git a/LayoutTests/websocket/tests/simple-stress-expected.txt b/LayoutTests/http/tests/websocket/tests/simple-stress-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/simple-stress-expected.txt
rename to LayoutTests/http/tests/websocket/tests/simple-stress-expected.txt
diff --git a/LayoutTests/websocket/tests/simple-stress.html b/LayoutTests/http/tests/websocket/tests/simple-stress.html
similarity index 100%
rename from LayoutTests/websocket/tests/simple-stress.html
rename to LayoutTests/http/tests/websocket/tests/simple-stress.html
diff --git a/LayoutTests/http/tests/websocket/tests/simple.html b/LayoutTests/http/tests/websocket/tests/simple.html
new file mode 100644
index 0000000..42cd38c
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/simple.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/simple.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/simple_wsh.py b/LayoutTests/http/tests/websocket/tests/simple_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/simple_wsh.py
rename to LayoutTests/http/tests/websocket/tests/simple_wsh.py
diff --git a/LayoutTests/websocket/tests/sub-protocol-expected.txt b/LayoutTests/http/tests/websocket/tests/sub-protocol-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/sub-protocol-expected.txt
rename to LayoutTests/http/tests/websocket/tests/sub-protocol-expected.txt
diff --git a/LayoutTests/websocket/tests/sub-protocol-with-space-expected.txt b/LayoutTests/http/tests/websocket/tests/sub-protocol-with-space-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/sub-protocol-with-space-expected.txt
rename to LayoutTests/http/tests/websocket/tests/sub-protocol-with-space-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/sub-protocol-with-space.html b/LayoutTests/http/tests/websocket/tests/sub-protocol-with-space.html
new file mode 100644
index 0000000..afaa2d1
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/sub-protocol-with-space.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/sub-protocol-with-space.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/websocket/tests/sub-protocol.html b/LayoutTests/http/tests/websocket/tests/sub-protocol.html
new file mode 100644
index 0000000..361defe
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/sub-protocol.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/sub-protocol.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/unicode-expected.txt b/LayoutTests/http/tests/websocket/tests/unicode-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/unicode-expected.txt
rename to LayoutTests/http/tests/websocket/tests/unicode-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/unicode.html b/LayoutTests/http/tests/websocket/tests/unicode.html
new file mode 100644
index 0000000..df31627
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/unicode.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/unicode.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/unicode_wsh.py b/LayoutTests/http/tests/websocket/tests/unicode_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/unicode_wsh.py
rename to LayoutTests/http/tests/websocket/tests/unicode_wsh.py
diff --git a/LayoutTests/websocket/tests/unknown-frame-type_wsh.py b/LayoutTests/http/tests/websocket/tests/unknown-frame-type_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/unknown-frame-type_wsh.py
rename to LayoutTests/http/tests/websocket/tests/unknown-frame-type_wsh.py
diff --git a/LayoutTests/websocket/tests/url-no-trailing-slash-expected.txt b/LayoutTests/http/tests/websocket/tests/url-no-trailing-slash-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/url-no-trailing-slash-expected.txt
rename to LayoutTests/http/tests/websocket/tests/url-no-trailing-slash-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/url-no-trailing-slash.html b/LayoutTests/http/tests/websocket/tests/url-no-trailing-slash.html
new file mode 100644
index 0000000..5727a67
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/url-no-trailing-slash.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/url-no-trailing-slash.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/websocket/tests/url-parsing-expected.txt b/LayoutTests/http/tests/websocket/tests/url-parsing-expected.txt
new file mode 100644
index 0000000..f0af999
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/url-parsing-expected.txt
@@ -0,0 +1,23 @@
+CONSOLE MESSAGE: line 0: Invalid url for WebSocket ws://javascript:a
+CONSOLE MESSAGE: line 0: Wrong url scheme for WebSocket http://127.0.0.1:8000/applet
+CONSOLE MESSAGE: line 0: Wrong url scheme for WebSocket javascript:a
+CONSOLE MESSAGE: line 0: WebSocket port 25 blocked
+CONSOLE MESSAGE: line 0: URL has fragment component ws://127.0.0.1/path#
+CONSOLE MESSAGE: line 0: 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("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/simple")).URL is "ws://127.0.0.1:8880/websocket/tests/simple"
+PASS (new WebSocket("ws://127.0.0.1:8880/websocket/tests/simple?")).URL is "ws://127.0.0.1:8880/websocket/tests/simple?"
+PASS (new WebSocket("ws://127.0.0.1:8880/websocket/tests/simple?k=v")).URL is "ws://127.0.0.1:8880/websocket/tests/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/url-parsing.html b/LayoutTests/http/tests/websocket/tests/url-parsing.html
new file mode 100644
index 0000000..790c6cf
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/url-parsing.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/url-parsing.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/url-with-credential-expected.txt b/LayoutTests/http/tests/websocket/tests/url-with-credential-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/url-with-credential-expected.txt
rename to LayoutTests/http/tests/websocket/tests/url-with-credential-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/url-with-credential.html b/LayoutTests/http/tests/websocket/tests/url-with-credential.html
new file mode 100644
index 0000000..11060f6
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/url-with-credential.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/url-with-credential.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/url-with-empty-query-expected.txt b/LayoutTests/http/tests/websocket/tests/url-with-empty-query-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/url-with-empty-query-expected.txt
rename to LayoutTests/http/tests/websocket/tests/url-with-empty-query-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/url-with-empty-query.html b/LayoutTests/http/tests/websocket/tests/url-with-empty-query.html
new file mode 100644
index 0000000..adc9437
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/url-with-empty-query.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/url-with-empty-query.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/url-with-query-expected.txt b/LayoutTests/http/tests/websocket/tests/url-with-query-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/url-with-query-expected.txt
rename to LayoutTests/http/tests/websocket/tests/url-with-query-expected.txt
diff --git a/LayoutTests/websocket/tests/url-with-query-for-no-query-expected.txt b/LayoutTests/http/tests/websocket/tests/url-with-query-for-no-query-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/url-with-query-for-no-query-expected.txt
rename to LayoutTests/http/tests/websocket/tests/url-with-query-for-no-query-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/url-with-query-for-no-query.html b/LayoutTests/http/tests/websocket/tests/url-with-query-for-no-query.html
new file mode 100644
index 0000000..7b96408
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/url-with-query-for-no-query.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/url-with-query-for-no-query.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/websocket/tests/url-with-query.html b/LayoutTests/http/tests/websocket/tests/url-with-query.html
new file mode 100644
index 0000000..23d90f9
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/url-with-query.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/url-with-query.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/websocket-event-target-expected.txt b/LayoutTests/http/tests/websocket/tests/websocket-event-target-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/websocket-event-target-expected.txt
rename to LayoutTests/http/tests/websocket/tests/websocket-event-target-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/websocket-event-target.html b/LayoutTests/http/tests/websocket/tests/websocket-event-target.html
new file mode 100644
index 0000000..c5a0a0a
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/websocket-event-target.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/websocket-event-target.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/websocket-pending-activity-expected.txt b/LayoutTests/http/tests/websocket/tests/websocket-pending-activity-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/websocket-pending-activity-expected.txt
rename to LayoutTests/http/tests/websocket/tests/websocket-pending-activity-expected.txt
diff --git a/LayoutTests/websocket/tests/websocket-pending-activity.html b/LayoutTests/http/tests/websocket/tests/websocket-pending-activity.html
similarity index 100%
rename from LayoutTests/websocket/tests/websocket-pending-activity.html
rename to LayoutTests/http/tests/websocket/tests/websocket-pending-activity.html
diff --git a/LayoutTests/websocket/tests/websocket-protocol-ignored-expected.txt b/LayoutTests/http/tests/websocket/tests/websocket-protocol-ignored-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/websocket-protocol-ignored-expected.txt
rename to LayoutTests/http/tests/websocket/tests/websocket-protocol-ignored-expected.txt
diff --git a/LayoutTests/http/tests/websocket/tests/websocket-protocol-ignored.html b/LayoutTests/http/tests/websocket/tests/websocket-protocol-ignored.html
new file mode 100644
index 0000000..f011b67
--- /dev/null
+++ b/LayoutTests/http/tests/websocket/tests/websocket-protocol-ignored.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../js-test-resources/js-test-style.css">
+<script src="../../../js-test-resources/js-test-pre.js"></script>
+<script src="../../../js-test-resources/js-test-post-function.js"></script>
+</head>
+<body>
+<div id="description"></div>
+<div id="console"></div>
+<script src="script-tests/websocket-protocol-ignored.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/websocket/tests/workers/close-in-onmessage-crash-expected.txt b/LayoutTests/http/tests/websocket/tests/workers/close-in-onmessage-crash-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/workers/close-in-onmessage-crash-expected.txt
rename to LayoutTests/http/tests/websocket/tests/workers/close-in-onmessage-crash-expected.txt
diff --git a/LayoutTests/websocket/tests/workers/close-in-onmessage-crash.html b/LayoutTests/http/tests/websocket/tests/workers/close-in-onmessage-crash.html
similarity index 100%
rename from LayoutTests/websocket/tests/workers/close-in-onmessage-crash.html
rename to LayoutTests/http/tests/websocket/tests/workers/close-in-onmessage-crash.html
diff --git a/LayoutTests/websocket/tests/workers/close-in-shared-worker-expected.txt b/LayoutTests/http/tests/websocket/tests/workers/close-in-shared-worker-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/workers/close-in-shared-worker-expected.txt
rename to LayoutTests/http/tests/websocket/tests/workers/close-in-shared-worker-expected.txt
diff --git a/LayoutTests/websocket/tests/workers/close-in-shared-worker.html b/LayoutTests/http/tests/websocket/tests/workers/close-in-shared-worker.html
similarity index 100%
rename from LayoutTests/websocket/tests/workers/close-in-shared-worker.html
rename to LayoutTests/http/tests/websocket/tests/workers/close-in-shared-worker.html
diff --git a/LayoutTests/websocket/tests/workers/close-in-worker-expected.txt b/LayoutTests/http/tests/websocket/tests/workers/close-in-worker-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/workers/close-in-worker-expected.txt
rename to LayoutTests/http/tests/websocket/tests/workers/close-in-worker-expected.txt
diff --git a/LayoutTests/websocket/tests/workers/close-in-worker.html b/LayoutTests/http/tests/websocket/tests/workers/close-in-worker.html
similarity index 100%
rename from LayoutTests/websocket/tests/workers/close-in-worker.html
rename to LayoutTests/http/tests/websocket/tests/workers/close-in-worker.html
diff --git a/LayoutTests/websocket/tests/workers/resources/close-in-onmessage-crash.js b/LayoutTests/http/tests/websocket/tests/workers/resources/close-in-onmessage-crash.js
similarity index 100%
rename from LayoutTests/websocket/tests/workers/resources/close-in-onmessage-crash.js
rename to LayoutTests/http/tests/websocket/tests/workers/resources/close-in-onmessage-crash.js
diff --git a/LayoutTests/websocket/tests/workers/resources/close-in-worker.js b/LayoutTests/http/tests/websocket/tests/workers/resources/close-in-worker.js
similarity index 100%
rename from LayoutTests/websocket/tests/workers/resources/close-in-worker.js
rename to LayoutTests/http/tests/websocket/tests/workers/resources/close-in-worker.js
diff --git a/LayoutTests/websocket/tests/workers/resources/echo-challenge_wsh.py b/LayoutTests/http/tests/websocket/tests/workers/resources/echo-challenge_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/workers/resources/echo-challenge_wsh.py
rename to LayoutTests/http/tests/websocket/tests/workers/resources/echo-challenge_wsh.py
diff --git a/LayoutTests/websocket/tests/workers/resources/echo_wsh.py b/LayoutTests/http/tests/websocket/tests/workers/resources/echo_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/workers/resources/echo_wsh.py
rename to LayoutTests/http/tests/websocket/tests/workers/resources/echo_wsh.py
diff --git a/LayoutTests/websocket/tests/workers/resources/simple_wsh.py b/LayoutTests/http/tests/websocket/tests/workers/resources/simple_wsh.py
similarity index 100%
rename from LayoutTests/websocket/tests/workers/resources/simple_wsh.py
rename to LayoutTests/http/tests/websocket/tests/workers/resources/simple_wsh.py
diff --git a/LayoutTests/websocket/tests/workers/resources/worker-handshake-challenge-randomness.js b/LayoutTests/http/tests/websocket/tests/workers/resources/worker-handshake-challenge-randomness.js
similarity index 100%
rename from LayoutTests/websocket/tests/workers/resources/worker-handshake-challenge-randomness.js
rename to LayoutTests/http/tests/websocket/tests/workers/resources/worker-handshake-challenge-randomness.js
diff --git a/LayoutTests/websocket/tests/workers/resources/worker-simple.js b/LayoutTests/http/tests/websocket/tests/workers/resources/worker-simple.js
similarity index 100%
rename from LayoutTests/websocket/tests/workers/resources/worker-simple.js
rename to LayoutTests/http/tests/websocket/tests/workers/resources/worker-simple.js
diff --git a/LayoutTests/websocket/tests/workers/shared-worker-simple-expected.txt b/LayoutTests/http/tests/websocket/tests/workers/shared-worker-simple-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/workers/shared-worker-simple-expected.txt
rename to LayoutTests/http/tests/websocket/tests/workers/shared-worker-simple-expected.txt
diff --git a/LayoutTests/websocket/tests/workers/shared-worker-simple.html b/LayoutTests/http/tests/websocket/tests/workers/shared-worker-simple.html
similarity index 100%
rename from LayoutTests/websocket/tests/workers/shared-worker-simple.html
rename to LayoutTests/http/tests/websocket/tests/workers/shared-worker-simple.html
diff --git a/LayoutTests/websocket/tests/workers/worker-handshake-challenge-randomness-expected.txt b/LayoutTests/http/tests/websocket/tests/workers/worker-handshake-challenge-randomness-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/workers/worker-handshake-challenge-randomness-expected.txt
rename to LayoutTests/http/tests/websocket/tests/workers/worker-handshake-challenge-randomness-expected.txt
diff --git a/LayoutTests/websocket/tests/workers/worker-handshake-challenge-randomness.html b/LayoutTests/http/tests/websocket/tests/workers/worker-handshake-challenge-randomness.html
similarity index 100%
rename from LayoutTests/websocket/tests/workers/worker-handshake-challenge-randomness.html
rename to LayoutTests/http/tests/websocket/tests/workers/worker-handshake-challenge-randomness.html
diff --git a/LayoutTests/websocket/tests/workers/worker-simple-expected.txt b/LayoutTests/http/tests/websocket/tests/workers/worker-simple-expected.txt
similarity index 100%
rename from LayoutTests/websocket/tests/workers/worker-simple-expected.txt
rename to LayoutTests/http/tests/websocket/tests/workers/worker-simple-expected.txt
diff --git a/LayoutTests/websocket/tests/workers/worker-simple.html b/LayoutTests/http/tests/websocket/tests/workers/worker-simple.html
similarity index 100%
rename from LayoutTests/websocket/tests/workers/worker-simple.html
rename to LayoutTests/http/tests/websocket/tests/workers/worker-simple.html
diff --git a/LayoutTests/platform/chromium-gpu/test_expectations.txt b/LayoutTests/platform/chromium-gpu/test_expectations.txt
index 2d437c6..c8c9ea4 100644
--- a/LayoutTests/platform/chromium-gpu/test_expectations.txt
+++ b/LayoutTests/platform/chromium-gpu/test_expectations.txt
@@ -40,7 +40,7 @@ WONTFIX SKIP : transitions = PASS FAIL
 WONTFIX SKIP : traversal = PASS FAIL
 WONTFIX SKIP : userscripts = PASS FAIL
 WONTFIX SKIP : webarchive = PASS FAIL
-WONTFIX SKIP : websocket = PASS FAIL
+WONTFIX SKIP : http/tests/websocket = PASS FAIL
 WONTFIX SKIP : wml = PASS FAIL
 
 // (These are the tests we actually run and expect to pass)
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index d884a32..564273f 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -161,7 +161,7 @@ WONTFIX SKIP : fast/files/workers = PASS TIMEOUT FAIL
 WONTFIX SKIP : http/tests/workers = PASS TIMEOUT FAIL
 WONTFIX SKIP : http/tests/xmlhttprequest/workers = PASS TIMEOUT FAIL
 WONTFIX SKIP : http/tests/eventsource/workers = PASS TIMEOUT FAIL
-WONTFIX SKIP : websocket/tests/workers/ = PASS TIMEOUT FAIL
+WONTFIX SKIP : http/tests/websocket/tests/workers/ = PASS TIMEOUT FAIL
 
 // Page Cache - based tests. Chromium disables page cache because the WebKit page cache keeps previously
 // loaded pages alive in memory to be able to quickly substitute them when user clicks History buttons.
@@ -2267,8 +2267,8 @@ BUG31252 : http/tests/security/listener/xss-inactive-closure.html = TEXT
 BUG31623 WIN: http/tests/appcache/remove-cache.html = PASS TEXT TIMEOUT
 
 // WebKit roll 52852 -> 52867
-BUG32018 : websocket/tests/frame-lengths.html = PASS TIMEOUT
-BUG32018 DEBUG : websocket/tests/simple-stress.html = PASS TEXT TIMEOUT
+BUG32018 : http/tests/websocket/tests/frame-lengths.html = PASS TIMEOUT
+BUG32018 DEBUG : http/tests/websocket/tests/simple-stress.html = PASS TEXT TIMEOUT
 
 // Flaky
 BUG31803 MAC LINUX : editing/inserting/12882.html = IMAGE PASS
@@ -2645,7 +2645,7 @@ BUGWK39655 : fast/dom/prototype-property.html = FAIL
 BUG45106 WIN : svg/clip-path/clip-path-evenodd-nonzero.svg = PASS CRASH
 BUG45106 WIN : svg/text/text-text-05-t.svg = PASS CRASH
 
-BUG45720 WIN LINUX : websocket/tests/reload-crash.html = PASS CRASH
+BUG45720 WIN LINUX : http/tests/websocket/tests/reload-crash.html = PASS CRASH
 
 // Chromium does not use the icon loader in WebCore for loading notifications.
 WONTFIX SKIP : http/tests/notifications = FAIL
@@ -2957,7 +2957,7 @@ BUG51571 WIN : http/tests/misc/bad-charset-alias.html = TIMEOUT PASS
 // Probably rebaseline, but want to make sure before doing so
 BUGJAPHET WIN : svg/custom/resource-invalidate-on-target-update.svg = IMAGE
 
-BUG51869 : websocket/tests/frame-length-overflow.html = TEXT PASS
+BUG51869 : http/tests/websocket/tests/frame-length-overflow.html = TEXT PASS
 
 BUG51854 WIN SLOW : http/tests/storage/callbacks-are-called-in-correct-context.html = PASS
 
diff --git a/LayoutTests/platform/mac/test_expectations.txt b/LayoutTests/platform/mac/test_expectations.txt
index 5c87201..fa826e5 100644
--- a/LayoutTests/platform/mac/test_expectations.txt
+++ b/LayoutTests/platform/mac/test_expectations.txt
@@ -59,7 +59,7 @@
 // Our slow tests, in alphabetical order.
 SLOW BUGXXX : http/tests/cache/subresource-expiration.html = PASS
 SLOW BUGXXX : tables/mozilla/other/slashlogo.html = PASS
-SLOW BUGXXX : websocket/tests/frame-lengths.html = PASS
+SLOW BUGXXX : http/tests/websocket/tests/frame-lengths.html = PASS
 
 BUG36620 : compositing/color-matching/image-color-matching.html = IMAGE
 BUG36620 : compositing/direct-image-compositing.html = IMAGE
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 920de82..13111d7 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -307,7 +307,7 @@ editing/selection/drag-in-iframe.html
 fast/events/dragging-mouse-moves.html
 
 # Crash beneath SocketStream::readStreamCallback http://webkit.org/b/44138
-websocket/tests/workers/worker-handshake-challenge-randomness.html
+http/tests/websocket/tests/workers/worker-handshake-challenge-randomness.html
 
 # http://webkit.org/b/46911
 accessibility/aria-hidden-update.html
@@ -812,8 +812,8 @@ media/video-display-aspect-ratio.html
 http/tests/misc/image-checks-for-accept.html
 
 # Tests timeout: https://bugs.webkit.org/show_bug.cgi?id=35041
-websocket/tests/frame-lengths.html
-websocket/tests/simple-stress.html
+http/tests/websocket/tests/frame-lengths.html
+http/tests/websocket/tests/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
diff --git a/LayoutTests/websocket/tests/alert-in-event-handler.html b/LayoutTests/websocket/tests/alert-in-event-handler.html
deleted file mode 100644
index b702cdb..0000000
--- a/LayoutTests/websocket/tests/alert-in-event-handler.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/alert-in-event-handler.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/bad-handshake-crash.html b/LayoutTests/websocket/tests/bad-handshake-crash.html
deleted file mode 100644
index da3a11e..0000000
--- a/LayoutTests/websocket/tests/bad-handshake-crash.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/bad-handshake-crash.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/bad-sub-protocol-control-chars.html b/LayoutTests/websocket/tests/bad-sub-protocol-control-chars.html
deleted file mode 100644
index 121192a..0000000
--- a/LayoutTests/websocket/tests/bad-sub-protocol-control-chars.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/bad-sub-protocol-control-chars.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/bad-sub-protocol-empty.html b/LayoutTests/websocket/tests/bad-sub-protocol-empty.html
deleted file mode 100644
index 5a2b521..0000000
--- a/LayoutTests/websocket/tests/bad-sub-protocol-empty.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/bad-sub-protocol-empty.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/bad-sub-protocol-non-ascii.html b/LayoutTests/websocket/tests/bad-sub-protocol-non-ascii.html
deleted file mode 100644
index 60e9769..0000000
--- a/LayoutTests/websocket/tests/bad-sub-protocol-non-ascii.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/bad-sub-protocol-non-ascii.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/bufferedAmount-after-close.html b/LayoutTests/websocket/tests/bufferedAmount-after-close.html
deleted file mode 100644
index f9a60ab..0000000
--- a/LayoutTests/websocket/tests/bufferedAmount-after-close.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/bufferedAmount-after-close.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/close-on-navigate-new-location.html b/LayoutTests/websocket/tests/close-on-navigate-new-location.html
deleted file mode 100644
index a662b70..0000000
--- a/LayoutTests/websocket/tests/close-on-navigate-new-location.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.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.");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-var frameDiv;
-var closedSocket;
-
-function endTest()
-{
-    shouldBe("closedSocket", '"socket1"');
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-};
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
-{
-    endTest();
-};
-
-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";
-};
-
-var successfullyParsed = true;
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/close-on-unload-and-force-gc.html b/LayoutTests/websocket/tests/close-on-unload-and-force-gc.html
deleted file mode 100644
index d88deba..0000000
--- a/LayoutTests/websocket/tests/close-on-unload-and-force-gc.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.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");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-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");
-    }
-};
-
-var frameDiv;
-var closedSocket;
-
-function endTest()
-{
-    shouldBe("closedSocket", '"socket1"');
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-};
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
-{
-    endTest();
-};
-
-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();
-};
-
-var successfullyParsed = true;
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/close-on-unload-reference-in-parent.html b/LayoutTests/websocket/tests/close-on-unload-reference-in-parent.html
deleted file mode 100644
index cc0510b..0000000
--- a/LayoutTests/websocket/tests/close-on-unload-reference-in-parent.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.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.");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-var frameDiv;
-var closedSocket;
-document.childWebSocket = null;
-
-function endTest()
-{
-    shouldBe("closedSocket", '"socket1"');
-    shouldBe("document.childWebSocket.readyState", "2");
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-};
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
-{
-    endTest();
-};
-
-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);
-};
-
-var successfullyParsed = true;
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/close-on-unload.html b/LayoutTests/websocket/tests/close-on-unload.html
deleted file mode 100644
index 6a3681a..0000000
--- a/LayoutTests/websocket/tests/close-on-unload.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.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");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-var frameDiv;
-var closedSocket;
-
-function endTest()
-{
-    shouldBe("closedSocket", '"socket1"');
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-};
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
-{
-    endTest();
-};
-
-document.iframeReady = function()
-{
-    debug("PASS 'socket1' is sent to the server. unload the iframe. expect receiving 'socket1' on ws...");
-    document.body.removeChild(frameDiv);
-}; 
-
-var successfullyParsed = true;
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/cross-origin-expected.txt b/LayoutTests/websocket/tests/cross-origin-expected.txt
deleted file mode 100644
index b072bdd..0000000
--- a/LayoutTests/websocket/tests/cross-origin-expected.txt
+++ /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/origin-test
-Connected
-PASS origin is "http://127.0.0.1:8880"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/websocket/tests/cross-origin.html b/LayoutTests/websocket/tests/cross-origin.html
deleted file mode 100644
index dab2228..0000000
--- a/LayoutTests/websocket/tests/cross-origin.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/cross-origin.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/error-detect.html b/LayoutTests/websocket/tests/error-detect.html
deleted file mode 100644
index 0be1ae2..0000000
--- a/LayoutTests/websocket/tests/error-detect.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/error-detect.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/frame-length-longer-than-buffer.html b/LayoutTests/websocket/tests/frame-length-longer-than-buffer.html
deleted file mode 100644
index a33b742..0000000
--- a/LayoutTests/websocket/tests/frame-length-longer-than-buffer.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/frame-length-longer-than-buffer.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/frame-length-overflow.html b/LayoutTests/websocket/tests/frame-length-overflow.html
deleted file mode 100644
index 627043a..0000000
--- a/LayoutTests/websocket/tests/frame-length-overflow.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.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");
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-function finish() {
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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");
-    finish();
-};
-
-var successfullyParsed = true;
-</script>
-
diff --git a/LayoutTests/websocket/tests/frame-length-skip.html b/LayoutTests/websocket/tests/frame-length-skip.html
deleted file mode 100644
index 895617f..0000000
--- a/LayoutTests/websocket/tests/frame-length-skip.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/frame-length-skip.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/handshake-challenge-randomness.html b/LayoutTests/websocket/tests/handshake-challenge-randomness.html
deleted file mode 100644
index 1160f77..0000000
--- a/LayoutTests/websocket/tests/handshake-challenge-randomness.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/handshake-challenge-randomness.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/handshake-error.html b/LayoutTests/websocket/tests/handshake-error.html
deleted file mode 100644
index fe5c69d..0000000
--- a/LayoutTests/websocket/tests/handshake-error.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/handshake-error.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/handshake-fail-by-cross-origin-expected.txt b/LayoutTests/websocket/tests/handshake-fail-by-cross-origin-expected.txt
deleted file mode 100644
index 4fb8706..0000000
--- a/LayoutTests/websocket/tests/handshake-fail-by-cross-origin-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-CONSOLE MESSAGE: line 0: Error during WebSocket handshake: origin mismatch: http://127.0.0.1:8880 != 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/fixed-origin
-PASS connected is false
-PASS origin is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/websocket/tests/handshake-fail-by-cross-origin.html b/LayoutTests/websocket/tests/handshake-fail-by-cross-origin.html
deleted file mode 100644
index 26aff94..0000000
--- a/LayoutTests/websocket/tests/handshake-fail-by-cross-origin.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/handshake-fail-by-cross-origin.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/handshake-fail-by-no-cr.html b/LayoutTests/websocket/tests/handshake-fail-by-no-cr.html
deleted file mode 100644
index cb9e2e3..0000000
--- a/LayoutTests/websocket/tests/handshake-fail-by-no-cr.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/handshake-fail-by-no-cr.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html b/LayoutTests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html
deleted file mode 100644
index 0957325..0000000
--- a/LayoutTests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/handshake-fail-by-sub-protocol-mismatch.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/httponly-cookie.pl b/LayoutTests/websocket/tests/httponly-cookie.pl
deleted file mode 100755
index f0a5e2f..0000000
--- a/LayoutTests/websocket/tests/httponly-cookie.pl
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/perl -wT
-use strict;
-
-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="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.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>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
-}
-
-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 endTest()
-{
-    cookie = normalizeCookie(cookie);
-    shouldBe("cookie", '"WK-websocket-test-httponly=1; WK-websocket-test=1"');
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-       layoutTestController.notifyDone();
-}
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/echo-cookie");
-ws.onopen = function() {
-    debug("WebSocket open");
-};
-ws.onmessage = function(evt) {
-    cookie = evt.data;
-    ws.close();
-};
-ws.onclose = function() {
-    debug("WebSocket closed");
-    endTest();
-};
-
-var successfullyParsed = true;
-</script>
-</body>
-</html>
-HTML
diff --git a/LayoutTests/websocket/tests/long-invalid-header.html b/LayoutTests/websocket/tests/long-invalid-header.html
deleted file mode 100644
index d7d7e71..0000000
--- a/LayoutTests/websocket/tests/long-invalid-header.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/long-invalid-header.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/null-character.html b/LayoutTests/websocket/tests/null-character.html
deleted file mode 100644
index f227f1a..0000000
--- a/LayoutTests/websocket/tests/null-character.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/null-character.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/reload-crash.html b/LayoutTests/websocket/tests/reload-crash.html
deleted file mode 100644
index 516c2f6..0000000
--- a/LayoutTests/websocket/tests/reload-crash.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.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");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-var frameDiv;
-var reloadCount = 0;
-
-function endTest()
-{
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-};
-
-document.iframeReady = function ()
-{
-    if (reloadCount == 0)
-       debug("PASS iframe is ready.");
-    if (reloadCount == 1) {
-       debug("PASS reloaded iframe while WebSocket is busy");
-       endTest();
-       return;
-    }
-    reloadCount += 1;
-};
-
-frameDiv = document.createElement("iframe");
-frameDiv.src = "resources/reload-crash-iframe.html";
-document.body.appendChild(frameDiv);
-debug("PASS insert a iframe");
-
-var successfullyParsed = true;
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html b/LayoutTests/websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html
deleted file mode 100644
index d230e25..0000000
--- a/LayoutTests/websocket/tests/resources/close-on-unload-iframe-reference-in-parent.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<script src="../../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../../fast/js/resources/js-test-post-function.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/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/websocket/tests/resources/close-on-unload-iframe.html b/LayoutTests/websocket/tests/resources/close-on-unload-iframe.html
deleted file mode 100644
index 46703c7..0000000
--- a/LayoutTests/websocket/tests/resources/close-on-unload-iframe.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<html>
-<head>
-<script src="../../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../../fast/js/resources/js-test-post-function.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/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/websocket/tests/resources/reload-crash-iframe.html b/LayoutTests/websocket/tests/resources/reload-crash-iframe.html
deleted file mode 100644
index 0abcbd6..0000000
--- a/LayoutTests/websocket/tests/resources/reload-crash-iframe.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>
-<head>
-<script src="../../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script type="text/javascript">
-parent.document.iframeReady();
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/close-on-unload");
-location.reload();
-</script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/script-tests/TEMPLATE.html b/LayoutTests/websocket/tests/script-tests/TEMPLATE.html
deleted file mode 100644
index 2afc297..0000000
--- a/LayoutTests/websocket/tests/script-tests/TEMPLATE.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="YOUR_JS_FILE_HERE"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/script-tests/cross-origin.js b/LayoutTests/websocket/tests/script-tests/cross-origin.js
deleted file mode 100644
index 10b5f10..0000000
--- a/LayoutTests/websocket/tests/script-tests/cross-origin.js
+++ /dev/null
@@ -1,46 +0,0 @@
-description("Web Socket Cross Origin test");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-var origin;
-
-function endTest()
-{
-    shouldBe("origin", '"http://127.0.0.1:8880"');
-    clearTimeout(timeoutID);
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-}
-
-var url = "ws://localhost:8880/websocket/tests/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);
-
-var successfullyParsed = true;
diff --git a/LayoutTests/websocket/tests/send-after-close-on-unload.html b/LayoutTests/websocket/tests/send-after-close-on-unload.html
deleted file mode 100644
index 5881f99..0000000
--- a/LayoutTests/websocket/tests/send-after-close-on-unload.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.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.");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-var frameDiv;
-var closedSocket;
-document.childWebSocket = null;
-
-function endTest()
-{
-    shouldBe("closedSocket", '"socket1"');
-    shouldBe("document.childWebSocket.readyState", "2");
-    isSuccessfullyParsed();
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-};
-
-var ws = new WebSocket("ws://127.0.0.1:8880/websocket/tests/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()
-{
-    endTest();
-};
-
-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')");
-};
-
-var successfullyParsed = true;
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/send-throw.html b/LayoutTests/websocket/tests/send-throw.html
deleted file mode 100644
index 750ba20..0000000
--- a/LayoutTests/websocket/tests/send-throw.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/send-throw.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/send.html b/LayoutTests/websocket/tests/send.html
deleted file mode 100644
index c6c0366..0000000
--- a/LayoutTests/websocket/tests/send.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/send.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/simple.html b/LayoutTests/websocket/tests/simple.html
deleted file mode 100644
index 817072d..0000000
--- a/LayoutTests/websocket/tests/simple.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/simple.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/sub-protocol-with-space.html b/LayoutTests/websocket/tests/sub-protocol-with-space.html
deleted file mode 100644
index 7973549..0000000
--- a/LayoutTests/websocket/tests/sub-protocol-with-space.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/sub-protocol-with-space.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/sub-protocol.html b/LayoutTests/websocket/tests/sub-protocol.html
deleted file mode 100644
index f7ec80f..0000000
--- a/LayoutTests/websocket/tests/sub-protocol.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/sub-protocol.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/unicode.html b/LayoutTests/websocket/tests/unicode.html
deleted file mode 100644
index f0c4566..0000000
--- a/LayoutTests/websocket/tests/unicode.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/unicode.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/url-no-trailing-slash.html b/LayoutTests/websocket/tests/url-no-trailing-slash.html
deleted file mode 100644
index a493a67..0000000
--- a/LayoutTests/websocket/tests/url-no-trailing-slash.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/url-no-trailing-slash.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/url-parsing-expected.txt b/LayoutTests/websocket/tests/url-parsing-expected.txt
deleted file mode 100644
index cbf44c3..0000000
--- a/LayoutTests/websocket/tests/url-parsing-expected.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-CONSOLE MESSAGE: line 0: Invalid url for WebSocket ws://javascript:a
-CONSOLE MESSAGE: line 0: Wrong url scheme for WebSocket http://127.0.0.1:8880/applet
-CONSOLE MESSAGE: line 0: Wrong url scheme for WebSocket javascript:a
-CONSOLE MESSAGE: line 0: WebSocket port 25 blocked
-CONSOLE MESSAGE: line 0: URL has fragment component ws://127.0.0.1/path#
-CONSOLE MESSAGE: line 0: 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("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/simple")).URL is "ws://127.0.0.1:8880/websocket/tests/simple"
-PASS (new WebSocket("ws://127.0.0.1:8880/websocket/tests/simple?")).URL is "ws://127.0.0.1:8880/websocket/tests/simple?"
-PASS (new WebSocket("ws://127.0.0.1:8880/websocket/tests/simple?k=v")).URL is "ws://127.0.0.1:8880/websocket/tests/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/websocket/tests/url-parsing.html b/LayoutTests/websocket/tests/url-parsing.html
deleted file mode 100644
index 4d6dde3..0000000
--- a/LayoutTests/websocket/tests/url-parsing.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/url-parsing.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/url-with-credential.html b/LayoutTests/websocket/tests/url-with-credential.html
deleted file mode 100644
index 7ac556a..0000000
--- a/LayoutTests/websocket/tests/url-with-credential.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/url-with-credential.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/url-with-empty-query.html b/LayoutTests/websocket/tests/url-with-empty-query.html
deleted file mode 100644
index 227f0b3..0000000
--- a/LayoutTests/websocket/tests/url-with-empty-query.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/url-with-empty-query.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/url-with-query-for-no-query.html b/LayoutTests/websocket/tests/url-with-query-for-no-query.html
deleted file mode 100644
index 7b0fc39..0000000
--- a/LayoutTests/websocket/tests/url-with-query-for-no-query.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/url-with-query-for-no-query.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/url-with-query.html b/LayoutTests/websocket/tests/url-with-query.html
deleted file mode 100644
index ac90502..0000000
--- a/LayoutTests/websocket/tests/url-with-query.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/url-with-query.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/websocket-event-target.html b/LayoutTests/websocket/tests/websocket-event-target.html
deleted file mode 100644
index b645f58..0000000
--- a/LayoutTests/websocket/tests/websocket-event-target.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/websocket-event-target.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/websocket/tests/websocket-protocol-ignored.html b/LayoutTests/websocket/tests/websocket-protocol-ignored.html
deleted file mode 100644
index 85cdcd0..0000000
--- a/LayoutTests/websocket/tests/websocket-protocol-ignored.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-</head>
-<body>
-<div id="description"></div>
-<div id="console"></div>
-<script src="script-tests/websocket-protocol-ignored.js"></script>
-</body>
-</html>
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index b457017..f2d31ae 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-30  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        WebSocket tests are flaky
+        https://bugs.webkit.org/show_bug.cgi?id=46956
+
+        Update these tools to understand how to run the WebSocket tests off the
+        Apache server.
+
+        * Scripts/old-run-webkit-tests:
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        * Scripts/webkitpy/layout_tests/port/websocket_server.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
 2010-10-01  Adam Roben  <aroben at apple.com>
 
         Encode Executive command arguments using UTF-8 on Cygwin
diff --git a/WebKitTools/Scripts/old-run-webkit-tests b/WebKitTools/Scripts/old-run-webkit-tests
index 80801dc..c1de976 100755
--- a/WebKitTools/Scripts/old-run-webkit-tests
+++ b/WebKitTools/Scripts/old-run-webkit-tests
@@ -693,7 +693,34 @@ for my $test (@tests) {
 
     if ($test =~ /^http\//) {
         configureAndOpenHTTPDIfNeeded();
-        if ($test !~ /^http\/tests\/local\// && $test !~ /^http\/tests\/ssl\// && $test !~ /^http\/tests\/wml\// && $test !~ /^http\/tests\/media\//) {
+        if ($test =~ /^http\/tests\/websocket\//) {
+            if ($test =~ /^websocket\/tests\/local\//) {
+                my $testPath = "$testDirectory/$test";
+                if (isCygwin()) {
+                    $testPath = toWindowsPath($testPath);
+                } else {
+                    $testPath = canonpath($testPath);
+                }
+                print OUT "$testPath\n";
+            } else {
+                if (openWebSocketServerIfNeeded()) {
+                    my $path = canonpath($test);
+                    if ($test =~ /^http\/tests\/websocket\/tests\/ssl\//) {
+                        # wss is disabled until all platforms support pyOpenSSL.
+                        print STDERR "Error: wss is disabled until all platforms support pyOpenSSL.";
+                    } else {
+                        $path =~ s/^http\/tests\///;
+                        print OUT "http://127.0.0.1:$httpdPort/$path\n";
+                    }
+                } else {
+                    # We failed to launch the WebSocket server.  Display a useful error message rather than attempting
+                    # to run tests that expect the server to be available.
+                    my $errorMessagePath = "$testDirectory/http/tests/websocket/resources/server-failed-to-start.html";
+                    $errorMessagePath = isCygwin() ? toWindowsPath($errorMessagePath) : canonpath($errorMessagePath);
+                    print OUT "$errorMessagePath\n";
+                }
+            }
+        } elsif ($test !~ /^http\/tests\/local\// && $test !~ /^http\/tests\/ssl\// && $test !~ /^http\/tests\/wml\// && $test !~ /^http\/tests\/media\//) {
             my $path = canonpath($test);
             $path =~ s/^http\/tests\///;
             print OUT "http://127.0.0.1:$httpdPort/$path$suffixExpectedHash\n";
@@ -710,33 +737,6 @@ for my $test (@tests) {
             }
             print OUT "$testPath$suffixExpectedHash\n";
         }
-    } elsif ($test =~ /^websocket\//) {
-        if ($test =~ /^websocket\/tests\/local\//) {
-            my $testPath = "$testDirectory/$test";
-            if (isCygwin()) {
-                $testPath = toWindowsPath($testPath);
-            } else {
-                $testPath = canonpath($testPath);
-            }
-            print OUT "$testPath\n";
-        } else {
-            if (openWebSocketServerIfNeeded()) {
-                my $path = canonpath($test);
-                if ($test =~ /^websocket\/tests\/ssl\//) {
-                    # wss is disabled until all platforms support pyOpenSSL.
-                    print STDERR "Error: wss is disabled until all platforms support pyOpenSSL.";
-                    # print OUT "https://127.0.0.1:$webSocketSecurePort/$path\n";
-                } else {
-                    print OUT "http://127.0.0.1:$webSocketPort/$path\n";
-                }
-            } else {
-                # We failed to launch the WebSocket server.  Display a useful error message rather than attempting
-                # to run tests that expect the server to be available.
-                my $errorMessagePath = "$testDirectory/websocket/resources/server-failed-to-start.html";
-                $errorMessagePath = isCygwin() ? toWindowsPath($errorMessagePath) : canonpath($errorMessagePath);
-                print OUT "$errorMessagePath\n";
-            }
-        }
     } else {
         my $testPath = "$testDirectory/$test";
         if (isCygwin()) {
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
index 4a4be83..f3db683 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
@@ -283,20 +283,16 @@ class Port(object):
     def filename_to_uri(self, filename):
         """Convert a test file to a URI."""
         LAYOUTTEST_HTTP_DIR = "http/tests/"
-        LAYOUTTEST_WEBSOCKET_DIR = "websocket/tests/"
+        LAYOUTTEST_WEBSOCKET_DIR = "http/tests/websocket/tests/"
 
         relative_path = self.relative_test_filename(filename)
         port = None
         use_ssl = False
 
-        if relative_path.startswith(LAYOUTTEST_HTTP_DIR):
-            # http/tests/ run off port 8000 and ssl/ off 8443
+        if (relative_path.startswith(LAYOUTTEST_WEBSOCKET_DIR)
+            or relative_path.startswith(LAYOUTTEST_HTTP_DIR)):
             relative_path = relative_path[len(LAYOUTTEST_HTTP_DIR):]
             port = 8000
-        elif relative_path.startswith(LAYOUTTEST_WEBSOCKET_DIR):
-            # websocket/tests/ run off port 8880 and 9323
-            # Note: the root is /, not websocket/tests/
-            port = 8880
 
         # Make http/tests/local run as local files. This is to mimic the
         # logic in run-webkit-tests.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py
index 9aeb378..926bc04 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py
@@ -124,12 +124,13 @@ class PyWebSocket(http_server.Lighttpd):
         if self._root:
             self._layout_tests = os.path.abspath(self._root)
             self._web_socket_tests = os.path.abspath(
-                os.path.join(self._root, 'websocket', 'tests'))
+                os.path.join(self._root, 'http', 'tests',
+                             'websocket', 'tests'))
         else:
             try:
                 self._layout_tests = self._port_obj.layout_tests_dir()
                 self._web_socket_tests = os.path.join(self._layout_tests,
-                     'websocket', 'tests')
+                     'http', 'tests', 'websocket', 'tests')
             except:
                 self._web_socket_tests = None
 
@@ -167,7 +168,7 @@ class PyWebSocket(http_server.Lighttpd):
             python_interp, '-u', pywebsocket_script,
             '--server-host', '127.0.0.1',
             '--port', str(self._port),
-            '--document-root', self._layout_tests,
+            '--document-root', os.path.join(self._layout_tests, 'http', 'tests'),
             '--scan-dir', self._web_socket_tests,
             '--cgi-paths', '/websocket/tests',
             '--log-file', error_log,
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 7b8cf4d..b350cb4 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -71,7 +71,7 @@ def passing_run(args=[], port_obj=None, record_results=False,
         # We use the glob to test that globbing works.
         new_args.extend(['passes',
                          'http/tests',
-                         'websocket/tests',
+                         'http/tests/websocket/tests',
                          'failures/expected/*'])
     options, parsed_args = run_webkit_tests.parse_args(new_args)
     if port_obj is None:
@@ -89,7 +89,7 @@ def logging_run(args=[], tests_included=False):
     if not tests_included:
         new_args.extend(['passes',
                          'http/tests',
-                         'websocket/tests',
+                         'http/tests/websocket/tests',
                          'failures/expected/*'])
     options, parsed_args = run_webkit_tests.parse_args(new_args)
     user = MockUser()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list