summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/websockets')
-rw-r--r--testing/web-platform/tests/websockets/Close-0.htm25
-rw-r--r--testing/web-platform/tests/websockets/Close-1000-reason.htm35
-rw-r--r--testing/web-platform/tests/websockets/Close-1000.htm35
-rw-r--r--testing/web-platform/tests/websockets/Close-NaN.htm25
-rw-r--r--testing/web-platform/tests/websockets/Close-Reason-124Bytes.htm27
-rw-r--r--testing/web-platform/tests/websockets/Close-clamp.htm14
-rw-r--r--testing/web-platform/tests/websockets/Close-null.htm25
-rw-r--r--testing/web-platform/tests/websockets/Close-reason-unpaired-surrogates.htm36
-rw-r--r--testing/web-platform/tests/websockets/Close-string.htm25
-rw-r--r--testing/web-platform/tests/websockets/Close-undefined.htm25
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-blocked-port.htm88
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-extensions-empty.htm33
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-url-with-space.htm19
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-valid-url-array-protocols.htm34
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-valid-url-binaryType-blob.htm34
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm33
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-string.htm34
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-valid-url.htm34
-rw-r--r--testing/web-platform/tests/websockets/Create-Secure-verify-url-set-non-default-port.htm19
-rw-r--r--testing/web-platform/tests/websockets/Create-asciiSep-protocol-string.htm21
-rw-r--r--testing/web-platform/tests/websockets/Create-invalid-urls.htm34
-rw-r--r--testing/web-platform/tests/websockets/Create-non-absolute-url.htm18
-rw-r--r--testing/web-platform/tests/websockets/Create-nonAscii-protocol-string.htm21
-rw-r--r--testing/web-platform/tests/websockets/Create-protocol-with-space.htm18
-rw-r--r--testing/web-platform/tests/websockets/Create-protocols-repeated-case-insensitive.htm18
-rw-r--r--testing/web-platform/tests/websockets/Create-protocols-repeated.htm18
-rw-r--r--testing/web-platform/tests/websockets/Create-valid-url-array-protocols.htm35
-rw-r--r--testing/web-platform/tests/websockets/Create-valid-url-protocol-empty.htm19
-rw-r--r--testing/web-platform/tests/websockets/Create-valid-url-protocol.htm34
-rw-r--r--testing/web-platform/tests/websockets/Create-valid-url.htm34
-rw-r--r--testing/web-platform/tests/websockets/Create-verify-url-set-non-default-port.htm19
-rw-r--r--testing/web-platform/tests/websockets/Create-wrong-scheme.htm18
-rw-r--r--testing/web-platform/tests/websockets/OWNERS8
-rw-r--r--testing/web-platform/tests/websockets/README.md10
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-0.htm25
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-1000-reason.htm35
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-1000-verify-code.htm35
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-1000.htm35
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-1005-verify-code.htm35
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-1005.htm25
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-2999-reason.htm24
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-3000-reason.htm35
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-3000-verify-code.htm34
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-4999-reason.htm35
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-NaN.htm25
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-Reason-124Bytes.htm27
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-Reason-Unpaired-surrogates.htm37
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-null.htm25
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-onlyReason.htm24
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-readyState-Closed.htm35
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-readyState-Closing.htm27
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-server-initiated-close.htm35
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-string.htm25
-rw-r--r--testing/web-platform/tests/websockets/Secure-Close-undefined.htm25
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-65K-data.htm44
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-65K-arraybuffer.htm44
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-arraybuffer.htm44
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float32.htm51
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float64.htm51
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-int32.htm51
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm51
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm51
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm51
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm51
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-binary-blob.htm48
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-data.htm41
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-null.htm43
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-paired-surrogates.htm41
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-unicode-data.htm41
-rw-r--r--testing/web-platform/tests/websockets/Secure-Send-unpaired-surrogates.htm41
-rw-r--r--testing/web-platform/tests/websockets/Send-0byte-data.htm41
-rw-r--r--testing/web-platform/tests/websockets/Send-65K-data.htm44
-rw-r--r--testing/web-platform/tests/websockets/Send-Unpaired-Surrogates.htm41
-rw-r--r--testing/web-platform/tests/websockets/Send-before-open.htm18
-rw-r--r--testing/web-platform/tests/websockets/Send-binary-65K-arraybuffer.htm44
-rw-r--r--testing/web-platform/tests/websockets/Send-binary-arraybuffer.htm44
-rw-r--r--testing/web-platform/tests/websockets/Send-binary-arraybufferview-int16-offset.htm51
-rw-r--r--testing/web-platform/tests/websockets/Send-binary-arraybufferview-int8.htm51
-rw-r--r--testing/web-platform/tests/websockets/Send-binary-blob.htm48
-rw-r--r--testing/web-platform/tests/websockets/Send-data.htm41
-rw-r--r--testing/web-platform/tests/websockets/Send-data.worker.js21
-rw-r--r--testing/web-platform/tests/websockets/Send-null.htm43
-rw-r--r--testing/web-platform/tests/websockets/Send-paired-surrogates.htm41
-rw-r--r--testing/web-platform/tests/websockets/Send-unicode-data.htm41
-rw-r--r--testing/web-platform/tests/websockets/binary/001.html26
-rw-r--r--testing/web-platform/tests/websockets/binary/002.html27
-rw-r--r--testing/web-platform/tests/websockets/binary/004.html26
-rw-r--r--testing/web-platform/tests/websockets/binary/005.html24
-rw-r--r--testing/web-platform/tests/websockets/binaryType-wrong-value.htm34
-rw-r--r--testing/web-platform/tests/websockets/closing-handshake/002.html22
-rw-r--r--testing/web-platform/tests/websockets/closing-handshake/003.html23
-rw-r--r--testing/web-platform/tests/websockets/closing-handshake/004.html24
-rw-r--r--testing/web-platform/tests/websockets/constants.js12
-rw-r--r--testing/web-platform/tests/websockets/constructor.html13
-rw-r--r--testing/web-platform/tests/websockets/constructor/001.html13
-rw-r--r--testing/web-platform/tests/websockets/constructor/002.html20
-rw-r--r--testing/web-platform/tests/websockets/constructor/004.html35
-rw-r--r--testing/web-platform/tests/websockets/constructor/005.html13
-rw-r--r--testing/web-platform/tests/websockets/constructor/006.html28
-rw-r--r--testing/web-platform/tests/websockets/constructor/007.html16
-rw-r--r--testing/web-platform/tests/websockets/constructor/008.html15
-rw-r--r--testing/web-platform/tests/websockets/constructor/009.html23
-rw-r--r--testing/web-platform/tests/websockets/constructor/010.html22
-rw-r--r--testing/web-platform/tests/websockets/constructor/011.html27
-rw-r--r--testing/web-platform/tests/websockets/constructor/012.html19
-rw-r--r--testing/web-platform/tests/websockets/constructor/013.html41
-rw-r--r--testing/web-platform/tests/websockets/constructor/014.html39
-rw-r--r--testing/web-platform/tests/websockets/constructor/016.html19
-rw-r--r--testing/web-platform/tests/websockets/constructor/017.html20
-rw-r--r--testing/web-platform/tests/websockets/constructor/018.html19
-rw-r--r--testing/web-platform/tests/websockets/constructor/019.html20
-rw-r--r--testing/web-platform/tests/websockets/constructor/020.html20
-rw-r--r--testing/web-platform/tests/websockets/constructor/021.html11
-rw-r--r--testing/web-platform/tests/websockets/constructor/022.html22
-rw-r--r--testing/web-platform/tests/websockets/cookies/001.html27
-rw-r--r--testing/web-platform/tests/websockets/cookies/002.html24
-rw-r--r--testing/web-platform/tests/websockets/cookies/003.html32
-rw-r--r--testing/web-platform/tests/websockets/cookies/004.html30
-rw-r--r--testing/web-platform/tests/websockets/cookies/005.html34
-rw-r--r--testing/web-platform/tests/websockets/cookies/006.html31
-rw-r--r--testing/web-platform/tests/websockets/cookies/007.html34
-rw-r--r--testing/web-platform/tests/websockets/cookies/support/set-cookie.py5
-rw-r--r--testing/web-platform/tests/websockets/eventhandlers.html19
-rw-r--r--testing/web-platform/tests/websockets/extended-payload-length.html67
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/echo-cookie_wsh.py12
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/echo-query_v13_wsh.py11
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/echo-query_wsh.py9
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/echo_close_data_wsh.py22
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/echo_exit_wsh.py21
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/echo_raw_wsh.py15
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/echo_wsh.py36
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/empty-message_wsh.py13
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/handshake_no_protocol_wsh.py12
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/handshake_protocol_wsh.py12
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/handshake_sleep_2_wsh.py10
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/invalid_wsh.py9
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/origin_wsh.py11
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/protocol_array_wsh.py14
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/protocol_wsh.py12
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/set-cookie-secure_wsh.py15
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/set-cookie_http_wsh.py14
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/set-cookie_wsh.py15
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/simple_handshake_wsh.py13
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/sleep_10_v13_wsh.py25
-rw-r--r--testing/web-platform/tests/websockets/handlers/stash_responder_wsh.py45
-rwxr-xr-xtesting/web-platform/tests/websockets/handlers/wrong_accept_key_wsh.py13
-rw-r--r--testing/web-platform/tests/websockets/interfaces/CloseEvent/clean-close.html23
-rw-r--r--testing/web-platform/tests/websockets/interfaces/CloseEvent/constructor.html35
-rw-r--r--testing/web-platform/tests/websockets/interfaces/CloseEvent/historical.html12
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer.html25
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob.html26
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html18
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-setter.html20
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting.html23
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-getting.html53
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-initial.html15
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html27
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-readonly.html16
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode.html23
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-basic.html26
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-connecting.html25
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-multiple.html29
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-nested.html28
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-replace.html15
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-return.html14
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/constants/001.html17
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/constants/002.html24
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/constants/003.html22
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/constants/004.html21
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/constants/005.html20
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/constants/006.html20
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/001.html17
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/002.html19
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/003.html21
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/004.html16
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/006.html17
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/007.html21
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/008.html24
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/009.html21
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/010.html21
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/011.html18
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/012.html18
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/013.html20
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/014.html21
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/015.html33
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/016.html37
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/017.html53
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/018.html49
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/019.html31
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/events/020.html17
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/extensions/001.html14
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/protocol/protocol-initial.html14
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/001.html13
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/002.html15
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/003.html18
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/004.html17
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/005.html19
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/006.html19
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/007.html19
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/008.html21
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/001.html15
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/002.html15
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/003.html15
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/004.html25
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/005.html18
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/006.html25
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/007.html26
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/008.html25
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/009.html26
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/010.html41
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/011.html27
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/send/012.html27
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/url/001.html13
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/url/002.html15
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/url/003.html17
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/url/004.html17
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/url/005.html17
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/url/006.html19
-rw-r--r--testing/web-platform/tests/websockets/interfaces/WebSocket/url/resolve.html14
-rw-r--r--testing/web-platform/tests/websockets/keeping-connection-open/001.html28
-rw-r--r--testing/web-platform/tests/websockets/opening-handshake/001.html19
-rw-r--r--testing/web-platform/tests/websockets/opening-handshake/002.html23
-rw-r--r--testing/web-platform/tests/websockets/opening-handshake/003-sets-origin.worker.js19
-rw-r--r--testing/web-platform/tests/websockets/opening-handshake/003.html23
-rw-r--r--testing/web-platform/tests/websockets/opening-handshake/005.html22
-rw-r--r--testing/web-platform/tests/websockets/security/001.html16
-rw-r--r--testing/web-platform/tests/websockets/security/002.html20
-rw-r--r--testing/web-platform/tests/websockets/security/check.py2
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001-1.html28
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001-2.html4
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/001.html25
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002-1.html34
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002-2.html4
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/002.html26
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/003.html14
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/004.html16
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/005-1.html25
-rw-r--r--testing/web-platform/tests/websockets/unload-a-document/005.html20
-rw-r--r--testing/web-platform/tests/websockets/websocket.sub.js107
239 files changed, 0 insertions, 6268 deletions
diff --git a/testing/web-platform/tests/websockets/Close-0.htm b/testing/web-platform/tests/websockets/Close-0.htm
deleted file mode 100644
index 4dd88f6c7..000000000
--- a/testing/web-platform/tests/websockets/Close-0.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Code is 0</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(0) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(0, "Close not in range 3000-4999") });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Close-1000-reason.htm b/testing/web-platform/tests/websockets/Close-1000-reason.htm
deleted file mode 100644
index 8424d7882..000000000
--- a/testing/web-platform/tests/websockets/Close-1000-reason.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Code is 1000 and reason</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(1000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(1000, "Clean Close");
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be opened");
- assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
- assert_equals(evt.wasClean, true, "wasClean should be TRUE");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Close-1000.htm b/testing/web-platform/tests/websockets/Close-1000.htm
deleted file mode 100644
index 1622109d8..000000000
--- a/testing/web-platform/tests/websockets/Close-1000.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Code is 1000</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create WebSocket - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(1000) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(1000);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be opened");
- assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
- assert_equals(evt.wasClean, true, "wasClean should be TRUE");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Close-NaN.htm b/testing/web-platform/tests/websockets/Close-NaN.htm
deleted file mode 100644
index 8fd221929..000000000
--- a/testing/web-platform/tests/websockets/Close-NaN.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Code is NaN</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(NaN) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(NaN) });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Close-Reason-124Bytes.htm b/testing/web-platform/tests/websockets/Close-Reason-124Bytes.htm
deleted file mode 100644
index 82a661e24..000000000
--- a/testing/web-platform/tests/websockets/Close-Reason-124Bytes.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Reason is more than 123 bytes long</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(code, 'reason more than 123 bytes') - SYNTAX_ERR is thrown");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- var reason = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123";
- assert_equals(reason.length, 124);
- assert_throws("SYNTAX_ERR", function () { wsocket.close(1000, reason) });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Close-clamp.htm b/testing/web-platform/tests/websockets/Close-clamp.htm
deleted file mode 100644
index 6660e813e..000000000
--- a/testing/web-platform/tests/websockets/Close-clamp.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<title>WebSocket#close(2**16+1000)</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="websocket.sub.js"></script>
-<div id="log"></div>
-<script>
-test(function() {
- var ws = CreateWebSocket(false, false, false);
- assert_throws("InvalidAccessError", function () {
- ws.close(0x10000 + 1000);
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/Close-null.htm b/testing/web-platform/tests/websockets/Close-null.htm
deleted file mode 100644
index dcd477313..000000000
--- a/testing/web-platform/tests/websockets/Close-null.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Code is null</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(null) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(null) });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Close-reason-unpaired-surrogates.htm b/testing/web-platform/tests/websockets/Close-reason-unpaired-surrogates.htm
deleted file mode 100644
index 9ad8d618c..000000000
--- a/testing/web-platform/tests/websockets/Close-reason-unpaired-surrogates.htm
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Reason with unpaired surrogates</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get opened");
- var testClose = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
- var replacementChar = "\uFFFD";
- var reason = "\uD807";
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(1000, reason);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be opened");
- assert_equals(evt.reason, replacementChar, "reason replaced with replacement character");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Close-string.htm b/testing/web-platform/tests/websockets/Close-string.htm
deleted file mode 100644
index d394d5cca..000000000
--- a/testing/web-platform/tests/websockets/Close-string.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Code is String</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(String) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close('string') });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Close-undefined.htm b/testing/web-platform/tests/websockets/Close-undefined.htm
deleted file mode 100644
index d6c89afbf..000000000
--- a/testing/web-platform/tests/websockets/Close-undefined.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close WebSocket - Code is undefined</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test();
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- wsocket.close(undefined);
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-blocked-port.htm b/testing/web-platform/tests/websockets/Create-Secure-blocked-port.htm
deleted file mode 100644
index e55bc31af..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-blocked-port.htm
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket - blocked port</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script>
- test(function () {
- // list of bad ports according to
- // https://fetch.spec.whatwg.org/#port-blocking
- var BLOCKED_PORTS_LIST = [
- 1, // tcpmux
- 7, // echo
- 9, // discard
- 11, // systat
- 13, // daytime
- 15, // netstat
- 17, // qotd
- 19, // chargen
- 20, // ftp-data
- 21, // ftp
- 22, // ssh
- 23, // telnet
- 25, // smtp
- 37, // time
- 42, // name
- 43, // nicname
- 53, // domain
- 77, // priv-rjs
- 79, // finger
- 87, // ttylink
- 95, // supdup
- 101, // hostriame
- 102, // iso-tsap
- 103, // gppitnp
- 104, // acr-nema
- 109, // pop2
- 110, // pop3
- 111, // sunrpc
- 113, // auth
- 115, // sftp
- 117, // uucp-path
- 119, // nntp
- 123, // ntp
- 135, // loc-srv / epmap
- 139, // netbios
- 143, // imap2
- 179, // bgp
- 389, // ldap
- 465, // smtp+ssl
- 512, // print / exec
- 513, // login
- 514, // shell
- 515, // printer
- 526, // tempo
- 530, // courier
- 531, // chat
- 532, // netnews
- 540, // uucp
- 556, // remotefs
- 563, // nntp+ssl
- 587, // smtp
- 601, // syslog-conn
- 636, // ldap+ssl
- 993, // imap+ssl
- 995, // pop3+ssl
- 2049, // nfs
- 3659, // apple-sasl
- 4045, // lockd
- 6000, // x11
- 6665, // irc (alternate)
- 6666, // irc (alternate)
- 6667, // irc (default)
- 6668, // irc (alternate)
- 6669, // irc (alternate)
- ];
- for (var i = 0; i < BLOCKED_PORTS_LIST.length; i++) {
- var blockedPort = BLOCKED_PORTS_LIST[i];
- assert_throws("SECURITY_ERR", function () { CreateWebSocketWithBlockedPort(blockedPort) });
- }
- }, "W3C WebSocket API - Create Secure WebSocket - Pass a URL with a blocked port - SECURITY_ERR should be thrown")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-extensions-empty.htm b/testing/web-platform/tests/websockets/Create-Secure-extensions-empty.htm
deleted file mode 100644
index 2f9f79765..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-extensions-empty.htm
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.extensions should be set to '' after connection is established - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.extensions, "", "extensions should be empty");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be closed");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-url-with-space.htm b/testing/web-platform/tests/websockets/Create-Secure-url-with-space.htm
deleted file mode 100644
index d2dfe1bd7..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-url-with-space.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket - url with space</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var wsocket;
- var spaceUrl = "web platform.test";
- assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithSpaceInUrl(spaceUrl) });
- }, "W3C WebSocket API - Create Secure WebSocket - Pass a URL with a space - SYNTAX_ERR should be thrown")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-valid-url-array-protocols.htm b/testing/web-platform/tests/websockets/Create-Secure-valid-url-array-protocols.htm
deleted file mode 100644
index d61a429c5..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url-array-protocols.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket with valid url and array of protocols</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, true);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-valid-url-binaryType-blob.htm b/testing/web-platform/tests/websockets/Create-Secure-valid-url-binaryType-blob.htm
deleted file mode 100644
index 0261fb48a..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url-binaryType-blob.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket - binaryType set correctly</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - wsocket.binaryType should be set to 'blob' after connection is established - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.binaryType, "blob", "binaryType should be set to Blob");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm b/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm
deleted file mode 100644
index a7f1510a0..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-setCorrectly.htm
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket and verify if protocol is set correctly after connection</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - protocol should be set correctly - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, true, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.protocol, "echo", "protocol should be set to echo");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-string.htm b/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-string.htm
deleted file mode 100644
index 7250b4e7b..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url-protocol-string.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket with valid url and protocol string</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Check readyState is 1");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL and protocol string - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, true, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-valid-url.htm b/testing/web-platform/tests/websockets/Create-Secure-valid-url.htm
deleted file mode 100644
index 1fe6c0f43..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-valid-url.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket with valid url</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Pass a valid URL - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-Secure-verify-url-set-non-default-port.htm b/testing/web-platform/tests/websockets/Create-Secure-verify-url-set-non-default-port.htm
deleted file mode 100644
index 63e49f4f7..000000000
--- a/testing/web-platform/tests/websockets/Create-Secure-verify-url-set-non-default-port.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket - wsocket.url is set correctly - non default port</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var urlNonDefaultPort = "wss://" + __SERVER__NAME + ":" + __NEW__SECURE__PORT + "/" + __PATH;
- var wsocket = new WebSocket(urlNonDefaultPort);
- assert_equals(wsocket.url, urlNonDefaultPort, "wsocket.url is set correctly");
- }, "W3C WebSocket API - Create Secure WebSocket - wsocket.url should be set correctly")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-asciiSep-protocol-string.htm b/testing/web-platform/tests/websockets/Create-asciiSep-protocol-string.htm
deleted file mode 100644
index 0d0480eb7..000000000
--- a/testing/web-platform/tests/websockets/Create-asciiSep-protocol-string.htm
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - ascii protocol string with separator</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- if(window.WebSocket) {
- test(function () {
- var asciiWithSep = "/echo";
- var wsocket;
- assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithAsciiSep(asciiWithSep) });
- }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with an ascii separator character - SYNTAX_ERR is thrown")
- }
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-invalid-urls.htm b/testing/web-platform/tests/websockets/Create-invalid-urls.htm
deleted file mode 100644
index c4a4c7986..000000000
--- a/testing/web-platform/tests/websockets/Create-invalid-urls.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - pass in list of invalid urls</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- var wsocket;
- test(function() {
- assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("/echo") });
- }, "Url is /echo - should throw SYNTAX_ERR");
-
- test(function () {
- assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("mailto:microsoft@microsoft.com") });
- }, "Url is a mail address - should throw SYNTAX_ERR");
-
- test(function () {
- assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("about:blank") });
- }, "Url is about:blank - should throw SYNTAX_ERR");
-
- test(function () {
- assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("?test") });
- }, "Url is ?test - should throw SYNTAX_ERR");
-
- test(function () {
- assert_throws("SYNTAX_ERR", function () { wsocket = new WebSocket("#test") });
- }, "Url is #test - should throw SYNTAX_ERR");
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-non-absolute-url.htm b/testing/web-platform/tests/websockets/Create-non-absolute-url.htm
deleted file mode 100644
index 2ed8ece16..000000000
--- a/testing/web-platform/tests/websockets/Create-non-absolute-url.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - non absolute url</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var wsocket;
- assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonAbsolute() });
- }, "W3C WebSocket API - Create WebSocket - Pass a non absolute URL - SYNTAX_ERR is thrown")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-nonAscii-protocol-string.htm b/testing/web-platform/tests/websockets/Create-nonAscii-protocol-string.htm
deleted file mode 100644
index fd3401801..000000000
--- a/testing/web-platform/tests/websockets/Create-nonAscii-protocol-string.htm
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - non ascii protocol string</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- if(window.WebSocket) {
- test(function () {
- var nonAsciiProtocol = "\u0080echo";
- var wsocket;
- assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonAsciiProtocol(nonAsciiProtocol) });
- }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with non-ascii values - SYNTAX_ERR is thrown")
- }
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-protocol-with-space.htm b/testing/web-platform/tests/websockets/Create-protocol-with-space.htm
deleted file mode 100644
index 023a49831..000000000
--- a/testing/web-platform/tests/websockets/Create-protocol-with-space.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - protocol with space</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var wsocket;
- assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithSpaceInProtocol("ec ho") });
- }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string with a space in it - SYNTAX_ERR is thrown")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-protocols-repeated-case-insensitive.htm b/testing/web-platform/tests/websockets/Create-protocols-repeated-case-insensitive.htm
deleted file mode 100644
index 47225ef2e..000000000
--- a/testing/web-platform/tests/websockets/Create-protocols-repeated-case-insensitive.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - repeated protocols with different case</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var wsocket;
- assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithRepeatedProtocolsCaseInsensitive() });
- }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and an array of protocol strings with repeated values but different case - SYNTAX_ERR is thrown")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-protocols-repeated.htm b/testing/web-platform/tests/websockets/Create-protocols-repeated.htm
deleted file mode 100644
index 6a62bca50..000000000
--- a/testing/web-platform/tests/websockets/Create-protocols-repeated.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - repeated protocols</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var wsocket;
- assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketWithRepeatedProtocols() });
- }, "W3C WebSocket API - Create WebSocket - Pass a valid URL and an array of protocol strings with repeated values - SYNTAX_ERR is thrown")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-valid-url-array-protocols.htm b/testing/web-platform/tests/websockets/Create-valid-url-array-protocols.htm
deleted file mode 100644
index 3ebf3f562..000000000
--- a/testing/web-platform/tests/websockets/Create-valid-url-array-protocols.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket with valid url and array of protocols</title>
- <script type="text/javascript" src="websocket.sub.js"></script>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and array of protocol strings - Connection should be closed");
-
- var wsocket = CreateWebSocket(false, false, true);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-valid-url-protocol-empty.htm b/testing/web-platform/tests/websockets/Create-valid-url-protocol-empty.htm
deleted file mode 100644
index 9146937ba..000000000
--- a/testing/web-platform/tests/websockets/Create-valid-url-protocol-empty.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - wsocket.protocol is empty before connection is established</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var wsocket = CreateWebSocket(false, true, false);
- assert_equals(wsocket.protocol, "", "protocol should be empty");
- wsocket.close();
- }, "W3C WebSocket API - Create WebSocket - wsocket.protocol should be empty before connection is established")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-valid-url-protocol.htm b/testing/web-platform/tests/websockets/Create-valid-url-protocol.htm
deleted file mode 100644
index 0a6dd97f0..000000000
--- a/testing/web-platform/tests/websockets/Create-valid-url-protocol.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket with a valid url and protocol string</title>
- <script type="text/javascript" src="websocket.sub.js"></script>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL and a protocol string - Connection should be closed");
-
- var wsocket = CreateWebSocket(false, true, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-valid-url.htm b/testing/web-platform/tests/websockets/Create-valid-url.htm
deleted file mode 100644
index e74a7bfef..000000000
--- a/testing/web-platform/tests/websockets/Create-valid-url.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket with valid url</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create WebSocket - Pass a valid URL - Connection should be closed");
-
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.readyState, 1, "readyState should be 1(OPEN)");
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-verify-url-set-non-default-port.htm b/testing/web-platform/tests/websockets/Create-verify-url-set-non-default-port.htm
deleted file mode 100644
index 181794df9..000000000
--- a/testing/web-platform/tests/websockets/Create-verify-url-set-non-default-port.htm
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - wsocket.url is set correctly - non default port</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var urlNonDefaultPort = "ws://" + __SERVER__NAME + ":" + __NEW__PORT + "/" + __PATH;
- var wsocket = new WebSocket(urlNonDefaultPort);
- assert_equals(wsocket.url, urlNonDefaultPort, "wsocket.url is set correctly");
- }, "W3C WebSocket API - Create WebSocket - wsocket.url should be set correctly");
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Create-wrong-scheme.htm b/testing/web-platform/tests/websockets/Create-wrong-scheme.htm
deleted file mode 100644
index a0a98205e..000000000
--- a/testing/web-platform/tests/websockets/Create-wrong-scheme.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create WebSocket - non ws/wss scheme in url</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var wsocket;
- assert_throws("SYNTAX_ERR", function () { wsocket = CreateWebSocketNonWsScheme() });
- }, "W3C WebSocket API - Create WebSocket - Pass a URL with a non ws/wss scheme - SYNTAX_ERR is thrown")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/OWNERS b/testing/web-platform/tests/websockets/OWNERS
deleted file mode 100644
index de8d614a7..000000000
--- a/testing/web-platform/tests/websockets/OWNERS
+++ /dev/null
@@ -1,8 +0,0 @@
-@kristijanburnik
-@zcorpan
-@plehegar
-@zqzhang
-@sideshowbarker
-@Jxck
-@jdm
-@Ms2ger
diff --git a/testing/web-platform/tests/websockets/README.md b/testing/web-platform/tests/websockets/README.md
deleted file mode 100644
index f03192230..000000000
--- a/testing/web-platform/tests/websockets/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-This directory contains the WebSocket API test suite.
-
-The following document contains a list of each test file in the test suite and the results of running the test file on several browsers <http://www.w3.org/wiki/Webapps/Interop/WebSockets>.
-
-To run this test suite within a browser, go to: <http://w3c-test.org/websockets/>.
-
-The latest Editor's Draft of WebSocket API is: <http://dev.w3.org/html5/websockets/>.
-
-The latest W3C Technical Report of WebSocket API is <http://www.w3.org/TR/websockets/>.
-
diff --git a/testing/web-platform/tests/websockets/Secure-Close-0.htm b/testing/web-platform/tests/websockets/Secure-Close-0.htm
deleted file mode 100644
index 03f8aa5fa..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-0.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 0</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(0) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(0, "Close not in range 3000-4999") });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-1000-reason.htm b/testing/web-platform/tests/websockets/Secure-Close-1000-reason.htm
deleted file mode 100644
index 3dead6bfb..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-1000-reason.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 1000 and reason</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(1000, "Clean Close");
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
- assert_equals(evt.wasClean, true, "wasClean should be TRUE");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-1000-verify-code.htm b/testing/web-platform/tests/websockets/Secure-Close-1000-verify-code.htm
deleted file mode 100644
index 0cac622f3..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-1000-verify-code.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 1000 - verify code in CloseEvent is 1000</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000, reason) - event.code == 1000 and event.reason = 'Clean Close'");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(1000, "Clean Close");
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.code, 1000, "CloseEvent.code should be 1000");
- assert_equals(evt.reason, "Clean Close", "CloseEvent.reason should be the same as the reason sent in close");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-1000.htm b/testing/web-platform/tests/websockets/Secure-Close-1000.htm
deleted file mode 100644
index 3da86305a..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-1000.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 1000</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1000) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(1000);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
- assert_equals(evt.wasClean, true, "wasClean should be TRUE");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-1005-verify-code.htm b/testing/web-platform/tests/websockets/Secure-Close-1005-verify-code.htm
deleted file mode 100644
index 6414b770c..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-1005-verify-code.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - verify return code is 1005</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close() - return close code is 1005 - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.code, 1005, "CloseEvent.code should be 1005");
- assert_equals(evt.reason, "", "CloseEvent.reason should be empty");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-1005.htm b/testing/web-platform/tests/websockets/Secure-Close-1005.htm
deleted file mode 100644
index de8f51f28..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-1005.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 1005</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(1005) - see '7.1.5. The WebSocket Connection Close Code' in http://www.ietf.org/rfc/rfc6455.txt");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(1005, "1005 - reserved code") });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-2999-reason.htm b/testing/web-platform/tests/websockets/Secure-Close-2999-reason.htm
deleted file mode 100644
index 223fc62ef..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-2999-reason.htm
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 2999 and reason</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(2999, reason) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(true, false, false);
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(2999, "Close not in range 3000-4999") });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-3000-reason.htm b/testing/web-platform/tests/websockets/Secure-Close-3000-reason.htm
deleted file mode 100644
index 80a8be781..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-3000-reason.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 3000 and reason</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(3000, "Clean Close with code - 3000");
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
- assert_equals(evt.wasClean, true, "wasClean should be TRUE");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-3000-verify-code.htm b/testing/web-platform/tests/websockets/Secure-Close-3000-verify-code.htm
deleted file mode 100644
index 9d385d99b..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-3000-verify-code.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 3000 - verify code in CloseEvent is 3000</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(3000, reason) - verify return code is 3000 - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(3000, "Clean Close");
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.code, 3000, "CloseEvent.code should be 3000");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-4999-reason.htm b/testing/web-platform/tests/websockets/Secure-Close-4999-reason.htm
deleted file mode 100644
index a6ea06949..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-4999-reason.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is 4999 and reason</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(4999, reason) - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(3000, "Clean Close with code - 4999");
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
- assert_equals(evt.wasClean, true, "wasClean should be TRUE");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-NaN.htm b/testing/web-platform/tests/websockets/Secure-Close-NaN.htm
deleted file mode 100644
index aae6075dc..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-NaN.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is NaN</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(NaN) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(NaN) });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-Reason-124Bytes.htm b/testing/web-platform/tests/websockets/Secure-Close-Reason-124Bytes.htm
deleted file mode 100644
index 94feb0f27..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-Reason-124Bytes.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Reason is more than 123 bytes long</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(code, 'reason more than 123 bytes') - SYNTAX_ERR is thrown");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- var reason = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123";
- assert_equals(reason.length, 124);
- assert_throws("SYNTAX_ERR", function () { wsocket.close(1000, reason) });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-Reason-Unpaired-surrogates.htm b/testing/web-platform/tests/websockets/Secure-Close-Reason-Unpaired-surrogates.htm
deleted file mode 100644
index 694717332..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-Reason-Unpaired-surrogates.htm
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Reason with unpaired surrogates</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(reason with unpaired surrogates) - connection should get closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
- var replacementChar = "\uFFFD";
- var reason = "\uD807";
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close(1000, reason);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be opened");
- assert_equals(evt.reason, replacementChar, "reason replaced with replacement character");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
-
diff --git a/testing/web-platform/tests/websockets/Secure-Close-null.htm b/testing/web-platform/tests/websockets/Secure-Close-null.htm
deleted file mode 100644
index f6b67d5ff..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-null.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is null</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(null) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close(null) });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-onlyReason.htm b/testing/web-platform/tests/websockets/Secure-Close-onlyReason.htm
deleted file mode 100644
index 278d7aa33..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-onlyReason.htm
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Only reason</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - close(only reason) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(true, false, false);
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close("Close with only reason") });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-readyState-Closed.htm b/testing/web-platform/tests/websockets/Secure-Close-readyState-Closed.htm
deleted file mode 100644
index 3ed38a8fe..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-readyState-Closed.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - verify readyState is 3 when onclose is fired</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.close();
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
- assert_equals(evt.wasClean, true, "wasClean should be TRUE");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-readyState-Closing.htm b/testing/web-platform/tests/websockets/Secure-Close-readyState-Closing.htm
deleted file mode 100644
index 10483965f..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-readyState-Closing.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - verify readyState is 2 before onclose is fired</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create Secure WebSocket - Close the Connection - readyState should be in CLOSING state just before onclose is called");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- wsocket.close();
- assert_equals(wsocket.readyState, 2, "readyState should be 2(CLOSING)");
- test.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-server-initiated-close.htm b/testing/web-platform/tests/websockets/Secure-Close-server-initiated-close.htm
deleted file mode 100644
index 4262754cb..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-server-initiated-close.htm
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Server Initiated close</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create Secure WebSocket - Server initiated Close - Client sends back a CLOSE - readyState should be in CLOSED state and wasClean is TRUE - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send("Goodbye");
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(wsocket.readyState, 3, "readyState should be 3(CLOSED)");
- assert_equals(evt.wasClean, true, "wasClean should be TRUE");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-string.htm b/testing/web-platform/tests/websockets/Secure-Close-string.htm
deleted file mode 100644
index 64bf16b1e..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-string.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is string</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test("W3C WebSocket API - Create WebSocket - Close the Connection - close(string) - INVALID_ACCESS_ERR is thrown");
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- assert_throws("INVALID_ACCESS_ERR", function () { wsocket.close('string') });
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Close-undefined.htm b/testing/web-platform/tests/websockets/Secure-Close-undefined.htm
deleted file mode 100644
index 9bd4861f0..000000000
--- a/testing/web-platform/tests/websockets/Secure-Close-undefined.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Close Secure WebSocket - Code is undefined</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var test = async_test();
-
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', test.step_func(function (evt) {
- wsocket.close(undefined);
- test.done();
- }), true);
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-65K-data.htm b/testing/web-platform/tests/websockets/Secure-Send-65K-data.htm
deleted file mode 100644
index f9bbe376d..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-65K-data.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send 65K data - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send 65K data on a Secure WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send 65K data on a Secure WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send 65K data on a Secure WebSocket - Connection should be closed");
-
- var data = "";
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- for (var i = 0; i < 65000; i++) {
- data = data + "c";
- }
- wsocket.send(data);
- assert_equals(data.length, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-65K-arraybuffer.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-65K-arraybuffer.htm
deleted file mode 100644
index 64cfc0241..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-65K-arraybuffer.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send 65K binary data - ArrayBuffer - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send 65K binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed");
-
- var data = "";
- var datasize = 65000;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- wsocket.send(data);
- assert_equals(datasize, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data.byteLength, datasize);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybuffer.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybuffer.htm
deleted file mode 100644
index 0e068ff57..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybuffer.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBuffer - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - ArrayBuffer - Connection should be closed");
-
- var data = "";
- var datasize = 15;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- wsocket.send(data);
- assert_equals(datasize, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data.byteLength, datasize);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float32.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float32.htm
deleted file mode 100644
index 30a8010a2..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float32.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Float32Array - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float32Array - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var view;
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- view = new Float32Array(data);
- for(var i = 0; i < 2; i++) {
- view[i] = i;
- }
- wsocket.send(view);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Float32Array(evt.data);
- for(var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float64.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float64.htm
deleted file mode 100644
index 1e121a882..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-float64.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Float32Array - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Float64Array - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var view;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- view = new Float64Array(data);
- for (var i = 0; i < 1; i++) {
- view[i] = i;
- }
- wsocket.send(view);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Float64Array(evt.data);
- for(var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-int32.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-int32.htm
deleted file mode 100644
index 316c62c96..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-int32.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Int32Array - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int32Array - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var view;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- view = new Int32Array(data);
- for(var i = 0; i < 2; i++) {
- view[i] = i;
- }
- wsocket.send(view);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Int32Array(evt.data);
- for(var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm
deleted file mode 100644
index 1737d93b1..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint16-offset-length.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Uint16Array with offset and length - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint16Array with offset and length - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var view;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- view = new Uint16Array(data, 2, 2);
- for(var i = 0; i < 4; i++) {
- view[i] = i;
- }
- wsocket.send(view);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Uint16Array(evt.data);
- for(var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm
deleted file mode 100644
index 735bae5ff..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint32-offset.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Uint32Array with offset - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint32Array with offset - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var view;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- view = new Uint32Array(data, 0);
- for(var i = 0; i < 2; i++) {
- view[i] = i;
- }
- wsocket.send(view);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Uint32Array(evt.data);
- for(var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm
deleted file mode 100644
index 83e14351a..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset-length.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Uint8Array with offset and length - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset and length - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var view;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- view = new Uint8Array(data, 2, 4);
- for(var i = 0; i < 8; i++) {
- view[i] = i;
- }
- wsocket.send(view);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Uint8Array(evt.data);
- for(var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm
deleted file mode 100644
index 413ec3431..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-arraybufferview-uint8-offset.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Uint8Array with offset - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Uint8Array with offset - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var view;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- view = new Uint8Array(data, 2);
- for(var i = 0; i < 8; i++) {
- view[i] = i;
- }
- wsocket.send(view);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Uint8Array(evt.data);
- for(var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-binary-blob.htm b/testing/web-platform/tests/websockets/Secure-Send-binary-blob.htm
deleted file mode 100644
index 6d52aa7e8..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-binary-blob.htm
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - Blob - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a Secure WebSocket - Blob - Connection should be closed");
-
- var data = "";
- var datasize = 65000;
- var isOpenCalled = false;
-
- var wsocket = CreateWebSocket(true, false, false);
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "blob";
- for (var i = 0; i < datasize; i++)
- data += String.fromCharCode(0);
- data = new Blob([data]);
- isOpenCalled = true;
- wsocket.send(data);
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_true(evt.data instanceof Blob);
- assert_equals(evt.data.size, datasize);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_true(evt.wasClean, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-data.htm b/testing/web-platform/tests/websockets/Secure-Send-data.htm
deleted file mode 100644
index d7c1595b3..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send data - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send data on a Secure WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send data on a Secure WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send data on a Secure WebSocket - Connection should be closed");
-
- var data = "Message to send";
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- assert_equals(data.length, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-null.htm b/testing/web-platform/tests/websockets/Secure-Send-null.htm
deleted file mode 100644
index 0a203359b..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-null.htm
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send null data - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send null data on a Secure WebSocket - Connection should be closed");
-
- var data = null;
- var nullReturned = false;
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- if ("null" == evt.data || "" == evt.data)
- nullReturned = true;
- assert_true(nullReturned);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-paired-surrogates.htm b/testing/web-platform/tests/websockets/Secure-Send-paired-surrogates.htm
deleted file mode 100644
index 959e307d2..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-paired-surrogates.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send (paired surrogates) data - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send paired surrogates data on a Secure WebSocket - Connection should be closed");
-
- var data = "\uD801\uDC07";
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- assert_equals(data.length * 2, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-unicode-data.htm b/testing/web-platform/tests/websockets/Secure-Send-unicode-data.htm
deleted file mode 100644
index 42de64164..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-unicode-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send unicode data - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send unicode data on a Secure WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send unicode data on a Secure WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send unicode data on a Secure WebSocket - Connection should be closed");
-
- var data = "¥¥¥¥¥¥";
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- assert_equals(data.length * 2, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Secure-Send-unpaired-surrogates.htm b/testing/web-platform/tests/websockets/Secure-Send-unpaired-surrogates.htm
deleted file mode 100644
index 11df504b1..000000000
--- a/testing/web-platform/tests/websockets/Secure-Send-unpaired-surrogates.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send unpaired surrogates - Secure WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send unpaired surrogates on a Secure WebSocket - Connection should be closed");
-
- var data = "\uD807";
- var replacementChar = "\uFFFD";
- var wsocket = CreateWebSocket(true, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, replacementChar);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-0byte-data.htm b/testing/web-platform/tests/websockets/Send-0byte-data.htm
deleted file mode 100644
index 52ab7ca5b..000000000
--- a/testing/web-platform/tests/websockets/Send-0byte-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send 0 byte data - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send 0 byte data on a WebSocket - Connection should be closed");
-
- var data = "";
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- assert_equals(data.length, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-65K-data.htm b/testing/web-platform/tests/websockets/Send-65K-data.htm
deleted file mode 100644
index 7d223403c..000000000
--- a/testing/web-platform/tests/websockets/Send-65K-data.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send 65K data - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send 65K data on a WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send 65K data on a WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send 65K data on a WebSocket - Connection should be closed");
-
- var data = "";
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- for (var i = 0; i < 65000; i++) {
- data = data + "c";
- }
- wsocket.send(data);
- assert_equals(data.length, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-Unpaired-Surrogates.htm b/testing/web-platform/tests/websockets/Send-Unpaired-Surrogates.htm
deleted file mode 100644
index 6697e687a..000000000
--- a/testing/web-platform/tests/websockets/Send-Unpaired-Surrogates.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send unpaired surrogates - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send unpaired surrogates on a WebSocket - Connection should be closed");
-
- var data = "\uD807";
- var replacementChar = "\uFFFD";
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, replacementChar);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-before-open.htm b/testing/web-platform/tests/websockets/Send-before-open.htm
deleted file mode 100644
index 1aace5405..000000000
--- a/testing/web-platform/tests/websockets/Send-before-open.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send WebSocket - Send before connection in established</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
- test(function () {
- var wsocket = CreateWebSocket(false, false, false);
- assert_throws("INVALID_STATE_ERR", function () { wsocket.send("Message to send") });
- }, "W3C WebSocket API - Send data on a WebSocket before connection is opened - INVALID_STATE_ERR is returned")
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-binary-65K-arraybuffer.htm b/testing/web-platform/tests/websockets/Send-binary-65K-arraybuffer.htm
deleted file mode 100644
index 95c12cf80..000000000
--- a/testing/web-platform/tests/websockets/Send-binary-65K-arraybuffer.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send 65K binary data - ArrayBuffer - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send 65K binary data on a WebSocket - ArrayBuffer - Connection should be closed");
-
- var data = "";
- var datasize = 65000;
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- wsocket.send(data);
- assert_equals(datasize, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data.byteLength, datasize);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-binary-arraybuffer.htm b/testing/web-platform/tests/websockets/Send-binary-arraybuffer.htm
deleted file mode 100644
index b960b921a..000000000
--- a/testing/web-platform/tests/websockets/Send-binary-arraybuffer.htm
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBuffer - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBuffer - Connection should be closed");
-
- var data = "";
- var datasize = 15;
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- wsocket.send(data);
- assert_equals(datasize, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data.byteLength, datasize);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int16-offset.htm b/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int16-offset.htm
deleted file mode 100644
index 0ebd3ac2a..000000000
--- a/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int16-offset.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Int16Array with offset - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int16Array with offset - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var view;
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- view = new Int16Array(data, 2);
- for(var i = 0; i < 4; i++) {
- view[i] = i;
- }
- wsocket.send(view);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Int16Array(evt.data);
- for(var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], view[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int8.htm b/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int8.htm
deleted file mode 100644
index 5336a8778..000000000
--- a/testing/web-platform/tests/websockets/Send-binary-arraybufferview-int8.htm
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - ArrayBufferView - Int8Array - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - ArrayBufferView - Int8Array - Connection should be closed");
-
- var data = "";
- var datasize = 8;
- var int8View;
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- int8View = new Int8Array(data);
- for (var i = 0; i < 8; i++) {
- int8View[i] = i;
- }
- wsocket.send(int8View);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- var resultView = new Int8Array(evt.data);
- for (var i = 0; i < resultView.length; i++) {
- assert_equals(resultView[i], int8View[i], "ArrayBufferView returned is the same");
- }
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-binary-blob.htm b/testing/web-platform/tests/websockets/Send-binary-blob.htm
deleted file mode 100644
index fa14f4cd4..000000000
--- a/testing/web-platform/tests/websockets/Send-binary-blob.htm
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send binary data - Blob - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send binary data on a WebSocket - Blob - Connection should be closed");
-
- var data = "";
- var datasize = 65000;
- var isOpenCalled = false;
-
- var wsocket = CreateWebSocket(false, false, false);
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.binaryType = "blob";
- for (var i = 0; i < datasize; i++)
- data += String.fromCharCode(0);
- data = new Blob([data]);
- isOpenCalled = true;
- wsocket.send(data);
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_true(evt.data instanceof Blob);
- assert_equals(evt.data.size, datasize);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_true(evt.wasClean, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-data.htm b/testing/web-platform/tests/websockets/Send-data.htm
deleted file mode 100644
index 547a15f86..000000000
--- a/testing/web-platform/tests/websockets/Send-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send data - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send data on a WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send data on a WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send data on a WebSocket - Connection should be closed");
-
- var data = "Message to send";
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- assert_equals(data.length, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-data.worker.js b/testing/web-platform/tests/websockets/Send-data.worker.js
deleted file mode 100644
index f607fd7cf..000000000
--- a/testing/web-platform/tests/websockets/Send-data.worker.js
+++ /dev/null
@@ -1,21 +0,0 @@
-importScripts("/resources/testharness.js");
-importScripts('websocket.sub.js')
-
-var data = "test data";
-
-async_test(function(t) {
-
- var wsocket = CreateWebSocket(false, false, false);
-
- wsocket.addEventListener('open', function (e) {
- wsocket.send(data)
- }, true)
-
- wsocket.addEventListener('message', t.step_func_done(function(e) {
- assert_equals(e.data, data);
- done();
- }), true);
-
-}, "W3C WebSocket API - Send data on a WebSocket in a Worker")
-
-
diff --git a/testing/web-platform/tests/websockets/Send-null.htm b/testing/web-platform/tests/websockets/Send-null.htm
deleted file mode 100644
index 5b7a6f150..000000000
--- a/testing/web-platform/tests/websockets/Send-null.htm
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send null data - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send null data on a WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send null data on a WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send null data on a WebSocket - Connection should be closed");
-
- var data = null;
- var nullReturned = false;
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- if ("null" == evt.data || "" == evt.data)
- nullReturned = true;
- assert_true(nullReturned);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-paired-surrogates.htm b/testing/web-platform/tests/websockets/Send-paired-surrogates.htm
deleted file mode 100644
index 44132212b..000000000
--- a/testing/web-platform/tests/websockets/Send-paired-surrogates.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send (paired surrogates) data - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send (paired surrogates) data on a WebSocket - Connection should be closed");
-
- var data = "\uD801\uDC07";
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- assert_equals(data.length * 2, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/Send-unicode-data.htm b/testing/web-platform/tests/websockets/Send-unicode-data.htm
deleted file mode 100644
index aba791837..000000000
--- a/testing/web-platform/tests/websockets/Send-unicode-data.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Send unicode data - WebSocket</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Connection should be opened");
- var testMessage = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Message should be received");
- var testClose = async_test("W3C WebSocket API - Send unicode data on a WebSocket - Connection should be closed");
-
- var data = "¥¥¥¥¥¥";
- var wsocket = CreateWebSocket(false, false, false);
- var isOpenCalled = false;
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- wsocket.send(data);
- assert_equals(data.length * 2, wsocket.bufferedAmount);
- isOpenCalled = true;
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('message', testMessage.step_func(function (evt) {
- assert_equals(evt.data, data);
- wsocket.close();
- testMessage.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(isOpenCalled, "WebSocket connection should be open");
- assert_equals(evt.wasClean, true, "wasClean should be true");
- testClose.done();
- }), true);
- </script>
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/binary/001.html b/testing/web-platform/tests/websockets/binary/001.html
deleted file mode 100644
index 4631ebcf7..000000000
--- a/testing/web-platform/tests/websockets/binary/001.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<title>WebSockets: Send/Receive blob, blob size less than network array buffer</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT + '/echo');
- var data = "";
- var datasize = 10;
- ws.onopen = t.step_func(function(e) {
- ws.binaryType = "blob";
- data = new ArrayBuffer(datasize);
- ws.send(data);
- })
- ws.onmessage = t.step_func(function(e) {
- assert_true(e.data instanceof Blob);
- assert_equals(e.data.size, datasize);
- t.done();
- })
-
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/binary/002.html b/testing/web-platform/tests/websockets/binary/002.html
deleted file mode 100644
index f2fa16a61..000000000
--- a/testing/web-platform/tests/websockets/binary/002.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<title>WebSockets: Send/Receive blob, blob size greater than network array buffer</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var data = "";
- var datasize = 100000;
- ws.onopen = t.step_func(function(e) {
- ws.binaryType = "blob";
- data = new ArrayBuffer(datasize);
- ws.send(data);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_true(e.data instanceof Blob);
- assert_equals(e.data.size, datasize);
- t.done();
- });
-
-}, null, {timeout:20000});
-</script>
diff --git a/testing/web-platform/tests/websockets/binary/004.html b/testing/web-platform/tests/websockets/binary/004.html
deleted file mode 100644
index 59b06d700..000000000
--- a/testing/web-platform/tests/websockets/binary/004.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<title>WebSockets: Send/Receive ArrayBuffer, size greater than network array buffer</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var data = "";
- var datasize = 100000;
- ws.onopen = t.step_func(function(e) {
- ws.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- ws.send(data);
- })
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data.byteLength, datasize);
- t.done();
- })
-
-}, null, {timeout:20000});
-</script>
diff --git a/testing/web-platform/tests/websockets/binary/005.html b/testing/web-platform/tests/websockets/binary/005.html
deleted file mode 100644
index 54c1aae90..000000000
--- a/testing/web-platform/tests/websockets/binary/005.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<title>WebSockets: Send/Receive ArrayBuffer, size less than network array buffer</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var data = "";
- var datasize = 10;
- ws.onopen = t.step_func(function(e) {
- ws.binaryType = "arraybuffer";
- data = new ArrayBuffer(datasize);
- ws.send(data);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data.byteLength, datasize);
- t.done();
- });
- });
-</script>
diff --git a/testing/web-platform/tests/websockets/binaryType-wrong-value.htm b/testing/web-platform/tests/websockets/binaryType-wrong-value.htm
deleted file mode 100644
index 2bab6710c..000000000
--- a/testing/web-platform/tests/websockets/binaryType-wrong-value.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>W3C WebSocket API - Create Secure WebSocket - binaryType is set to something other than blob/arraybuffer</title>
- <script type="text/javascript" src="/resources/testharness.js"></script>
- <script type="text/javascript" src="/resources/testharnessreport.js"></script>
- <script type="text/javascript" src="websocket.sub.js"></script>
-</head>
-<body>
- <div id="log"></div>
- <script type="text/javascript">
-
- var testOpen = async_test("W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be opened");
- var testClose = async_test("W3C WebSocket API - Create WebSocket - set binaryType to something other than blob or arraybuffer - SYNTAX_ERR is returned - Connection should be closed");
-
- var wsocket = CreateWebSocket(true, false, false);
-
- wsocket.addEventListener('open', testOpen.step_func(function (evt) {
- assert_equals(wsocket.binaryType, "blob");
- wsocket.binaryType = "notBlobOrArrayBuffer";
- assert_equals(wsocket.binaryType, "blob");
- wsocket.close();
- testOpen.done();
- }), true);
-
- wsocket.addEventListener('close', testClose.step_func(function (evt) {
- assert_true(evt.wasClean, "wasClean should be true");
- testClose.done();
- }), true);
-
- </script>
-
-</body>
-</html>
diff --git a/testing/web-platform/tests/websockets/closing-handshake/002.html b/testing/web-platform/tests/websockets/closing-handshake/002.html
deleted file mode 100644
index f60604d40..000000000
--- a/testing/web-platform/tests/websockets/closing-handshake/002.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<title>WebSockets: server sends closing handshake</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo_exit');
- ws.onmessage = ws.onerror = t.step_func(function() {assert_unreached()});
- ws.onopen = t.step_func(function(e) {
- ws.send('Goodbye');
- })
- ws.onclose = t.step_func(function(e) {
- assert_equals(e.wasClean, true, 'e.wasClean');
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done();}), 50)
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/closing-handshake/003.html b/testing/web-platform/tests/websockets/closing-handshake/003.html
deleted file mode 100644
index c032d498a..000000000
--- a/testing/web-platform/tests/websockets/closing-handshake/003.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<title>WebSockets: client sends closing handshake</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT + '/echo');
- ws.onmessage = ws.onerror = t.step_func(function() {assert_unreached()});
- ws.onopen = t.step_func(function(e) {
- ws.close();
- });
- ws.onclose = t.step_func(function(e) {
- assert_equals(e.code, 1005, 'e.code');
- assert_equals(e.wasClean, true, 'e.wasClean');
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done()}), 50);
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/closing-handshake/004.html b/testing/web-platform/tests/websockets/closing-handshake/004.html
deleted file mode 100644
index 343a28a23..000000000
--- a/testing/web-platform/tests/websockets/closing-handshake/004.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<title>WebSockets: data after closing handshake</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo_close_data');
- ws.onmessage = ws.onerror = t.step_func(function() {assert_unreached()});
-
- ws.onopen = t.step_func(function(e) {
- ws.send('Goodbye');
- })
-
- ws.onclose = t.step_func(function(e) {
- assert_equals(e.wasClean, true);
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done()}), 50);
- })
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constants.js b/testing/web-platform/tests/websockets/constants.js
deleted file mode 100644
index 8312cd253..000000000
--- a/testing/web-platform/tests/websockets/constants.js
+++ /dev/null
@@ -1,12 +0,0 @@
-//This file requires server-side substitutions and must be included as constants.js?pipe=sub
-
-var PORT = "{{ports[ws][0]}}";
-//FIXME: Add support for wss
-var PORT_SSL = "{{ports[ws][0]}}";
-
-var SCHEME_DOMAIN_PORT;
-if (location.search == '?wss') {
- SCHEME_DOMAIN_PORT = 'wss://{{host}}:' + PORT_SSL;
-} else {
- SCHEME_DOMAIN_PORT = 'ws://{{host}}:' + PORT;
-}
diff --git a/testing/web-platform/tests/websockets/constructor.html b/testing/web-platform/tests/websockets/constructor.html
deleted file mode 100644
index c135b325e..000000000
--- a/testing/web-platform/tests/websockets/constructor.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<title>WebSocket constructor</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="websocket.sub.js"></script>
-<div id="log"></div>
-<script>
-test(function() {
- var ws = new WebSocket("ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH,
- "echo", "Stray argument")
- assert_true(ws instanceof WebSocket, "Expected a WebSocket instance.")
-}, "Calling the WebSocket constructor with too many arguments should not throw.")
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/001.html b/testing/web-platform/tests/websockets/constructor/001.html
deleted file mode 100644
index 2a868bfa0..000000000
--- a/testing/web-platform/tests/websockets/constructor/001.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html>
-<title>WebSockets: new WebSocket() with no args</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- assert_throws(new TypeError(), function(){new WebSocket()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/002.html b/testing/web-platform/tests/websockets/constructor/002.html
deleted file mode 100644
index 94015979b..000000000
--- a/testing/web-platform/tests/websockets/constructor/002.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: new WebSocket(invalid url)</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("/test")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("ws://foo bar.com/")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("wss://foo bar.com/")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("http://"+location.host+"/")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("mailto:example@example.org")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("about:blank")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket(SCHEME_DOMAIN_PORT+"/#")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket(SCHEME_DOMAIN_PORT+"/#test")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("?test")})});
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("#test")})});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/004.html b/testing/web-platform/tests/websockets/constructor/004.html
deleted file mode 100644
index f35802154..000000000
--- a/testing/web-platform/tests/websockets/constructor/004.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!doctype html>
-<title>WebSockets: new WebSocket(url, invalid protocol)</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-// empty string
-test(function() {
- assert_throws("SyntaxError", function() {
- new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message', "")
- })
-});
-
-// chars below U+0020 except U+0000; U+0000 is tested in a separate test
-for (var i = 1; i < 0x20; ++i) {
- test(function() {
- assert_throws("SyntaxError", function() {
- new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message',
- "a"+String.fromCharCode(i)+"b")
- }, 'char code '+i);
- })
-}
-// some chars above U+007E
-for (var i = 0x7F; i < 0x100; ++i) {
- test(function() {
- assert_throws("SyntaxError", function() {
- new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message',
- "a"+String.fromCharCode(i)+"b")
- }, 'char code '+i);
- })
-}
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/005.html b/testing/web-platform/tests/websockets/constructor/005.html
deleted file mode 100644
index 63e61ddb0..000000000
--- a/testing/web-platform/tests/websockets/constructor/005.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html>
-<title>WebSockets: return value</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- assert_true(new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message') instanceof WebSocket);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/006.html b/testing/web-platform/tests/websockets/constructor/006.html
deleted file mode 100644
index a9d01bbf3..000000000
--- a/testing/web-platform/tests/websockets/constructor/006.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<title>WebSockets: converting first arguments</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var a = document.createElement('a');
- a.href = SCHEME_DOMAIN_PORT+'/echo';
- var ws = new WebSocket(a); // should stringify arguments; <a> stringifies to its .href
- assert_equals(ws.url, a.href);
- ws.onopen = t.step_func(function(e) {
- ws.send('test');
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, 'test');
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done()}), 50);
- });
- ws.close();
- });
- ws.onerror = ws.onclose = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/007.html b/testing/web-platform/tests/websockets/constructor/007.html
deleted file mode 100644
index 6f141a541..000000000
--- a/testing/web-platform/tests/websockets/constructor/007.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<title>WebSockets: new WebSocket(url, null char)</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- assert_throws("SyntaxError", function() {
- new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message',
- 'a' + String.fromCharCode(0) + 'b')
- })
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/008.html b/testing/web-platform/tests/websockets/constructor/008.html
deleted file mode 100644
index f425ff058..000000000
--- a/testing/web-platform/tests/websockets/constructor/008.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<title>WebSockets: new WebSocket(url with not blocked port)</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-//Pass condition is to not throw
-test(function(){new WebSocket('ws://example.invalid:80/')});
-test(function(){new WebSocket('ws://example.invalid:443/')});
-test(function(){new WebSocket('wss://example.invalid:80/')});
-test(function(){new WebSocket('wss://example.invalid:443/')});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/009.html b/testing/web-platform/tests/websockets/constructor/009.html
deleted file mode 100644
index 56eb912c8..000000000
--- a/testing/web-platform/tests/websockets/constructor/009.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<title>WebSockets: protocol</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/protocol', 'foobar');
-
- ws.onmessage = t.step_func(function(e) {
- assert_equals(ws.protocol, 'foobar');
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done()}), 50);
- })
- ws.close();
- })
- ws.onerror = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/010.html b/testing/web-platform/tests/websockets/constructor/010.html
deleted file mode 100644
index da2a9bf59..000000000
--- a/testing/web-platform/tests/websockets/constructor/010.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<title>WebSockets: protocol in response but no requested protocol</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/handshake_protocol');
- ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
- ws.onopen = t.step_func(function(e) {
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
- setTimeout(t.step_func(function() {t.done();}), 50);
- })
- ws.close();
- })
-});
-</script>
-
diff --git a/testing/web-platform/tests/websockets/constructor/011.html b/testing/web-platform/tests/websockets/constructor/011.html
deleted file mode 100644
index e8d0b3aaf..000000000
--- a/testing/web-platform/tests/websockets/constructor/011.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<title>WebSockets: protocol mismatch</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/handshake_protocol', 'FOOBAR');
- var gotOpen = false;
- var gotError = false;
- ws.onopen = t.step_func(function(e) {
- gotOpen = true;
- })
- ws.onerror = t.step_func(function(e) {
- gotError = true;
- })
- ws.onclose = t.step_func(function(e) {
- assert_true(gotOpen, 'got open');
- assert_true(gotError, 'got error');
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done();}), 50);
- })
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/012.html b/testing/web-platform/tests/websockets/constructor/012.html
deleted file mode 100644
index 29ac6d53f..000000000
--- a/testing/web-platform/tests/websockets/constructor/012.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<title>WebSockets: no protocol in response</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/handshake_no_protocol', 'foobar');
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done();}), 50)
- })
- ws.onmessage = t.step_func(function() {assert_unreached()});
-});
-</script>
-
diff --git a/testing/web-platform/tests/websockets/constructor/013.html b/testing/web-platform/tests/websockets/constructor/013.html
deleted file mode 100644
index fe777af19..000000000
--- a/testing/web-platform/tests/websockets/constructor/013.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!doctype html>
-<title>WebSockets: multiple WebSocket objects</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- // test that the events are fired as they should when opening 25 websockets and
- // sending a message on each and then closing when getting the message back
- var ws = [];
- var events = 0;
- for (var i = 0; i < 25; ++i) {
- ws[i] = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws[i].id = i;
- ws[i].onopen = t.step_func(function(e) {
- events++;
- this.send(this.id);
- this.onopen = t.step_func(function() {assert_unreached()});
- }, ws[i]);
- ws[i].onmessage = t.step_func(function(e) {
- events++;
- assert_equals(e.data, ''+this.id);
- this.close();
- this.onmessage = t.step_func(function() {assert_unreached()});
- }, ws[i]);
- ws[i].onclose = t.step_func(function(e) {
- events++;
- if (events == 75) {
- t.done();
- }
- this.onclose = t.step_func(function() {assert_unreached()});
- }, ws[i]);
- ws[i].onerror = t.step_func(function() {assert_unreached()});
- }
-}, null, {timeout:25000});
-</script>
-
diff --git a/testing/web-platform/tests/websockets/constructor/014.html b/testing/web-platform/tests/websockets/constructor/014.html
deleted file mode 100644
index 579a5d3ed..000000000
--- a/testing/web-platform/tests/websockets/constructor/014.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!doctype html>
-<title>WebSockets: serialize establish a connection</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-
-async_test(function(t) {
- var ws = [];
- var events = 0;
- var prevDate;
- var date;
- for (var i = 0; i < 4; ++i) {
- ws[i] = new WebSocket(SCHEME_DOMAIN_PORT+'/handshake_sleep_2');
- ws[i].id = i;
- ws[i].onopen = t.step_func(function(e) {
- events++;
- date = new Date();
- if (prevDate) {
- assert_greater_than(date - prevDate, 1000);
- }
- prevDate = date;
- this.onopen = t.step_func(function() {assert_unreached()});
- }.bind(ws[i]))
- ws[i].onclose = t.step_func(function() {
- events++;
- if (events == 8) {
- t.done();
- }
- this.onclose = t.step_func(function() {assert_unreached()});
- }.bind(ws[i]));
- ws[i].onerror = ws[i].onmessage = t.step_func(function() {assert_unreached()});
- }
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/016.html b/testing/web-platform/tests/websockets/constructor/016.html
deleted file mode 100644
index a1bf28167..000000000
--- a/testing/web-platform/tests/websockets/constructor/016.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<meta charset=windows-1252>
-<title>WebSockets: non-ascii URL in query, document encoding windows-1252</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-query_v13?åäö');
- ws.onclose = t.step_func(function() {assert_unreached()});
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, '%C3%A5%C3%A4%C3%B6');
- t.done();
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/017.html b/testing/web-platform/tests/websockets/constructor/017.html
deleted file mode 100644
index 8a7960d88..000000000
--- a/testing/web-platform/tests/websockets/constructor/017.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: too few slashes after ws: and wss:</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var tests = [
- ['ws:', PORT],
- ['ws:/', PORT],
- ['wss:', PORT_SSL],
- ['wss:/', PORT_SSL]
-];
-//Pass condition is to not throw
-for (var i = 0; i < tests.length; ++i) {
- test(function(){new WebSocket(tests[i][0] + location.hostname + ':' + tests[i][1] + '/echo')}, tests[i][0]);
-}
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/018.html b/testing/web-platform/tests/websockets/constructor/018.html
deleted file mode 100644
index d96d4be6b..000000000
--- a/testing/web-platform/tests/websockets/constructor/018.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<title>WebSockets: NULL char in url</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-query?x\u0000y\u0000');
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, 'x%00y');
- ws.close();
- t.done();
- })
- ws.onclose = ws.onerror = t.step_func(function(e) {assert_unreached(e.type)});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/019.html b/testing/web-platform/tests/websockets/constructor/019.html
deleted file mode 100644
index b56745aa2..000000000
--- a/testing/web-platform/tests/websockets/constructor/019.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: uppercase 'WS:'</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var scheme = SCHEME_DOMAIN_PORT.split('://')[0];
- var domain = SCHEME_DOMAIN_PORT.split('://')[1];
- var ws = new WebSocket(scheme.toUpperCase()+'://'+domain+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.close();
- t.done();
- })
- ws.onclose = ws.onerror = ws.onmessage = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/020.html b/testing/web-platform/tests/websockets/constructor/020.html
deleted file mode 100644
index 55ca9934b..000000000
--- a/testing/web-platform/tests/websockets/constructor/020.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: uppercase host</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var scheme = SCHEME_DOMAIN_PORT.split('://')[0];
- var domain = SCHEME_DOMAIN_PORT.split('://')[1];
- var ws = new WebSocket(scheme+'://'+domain.toUpperCase()+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.close();
- t.done();
- });
- ws.onclose = ws.onerror = ws.onmessage = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/021.html b/testing/web-platform/tests/websockets/constructor/021.html
deleted file mode 100644
index 80156540f..000000000
--- a/testing/web-platform/tests/websockets/constructor/021.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!doctype html>
-<title>WebSockets: Same sub protocol twice</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {assert_throws("SyntaxError", function(){new WebSocket("ws://certo2.oslo.osa/protocol_array",["foobar, foobar"])})});
-</script>
diff --git a/testing/web-platform/tests/websockets/constructor/022.html b/testing/web-platform/tests/websockets/constructor/022.html
deleted file mode 100644
index 136a40d10..000000000
--- a/testing/web-platform/tests/websockets/constructor/022.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<title>WebSockets: protocol array</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/protocol_array',['foobar','foobar2']);
- ws.onmessage = t.step_func(function(e) {
- assert_equals(ws.protocol, 'foobar');
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done();}), 50)
- });
- ws.close();
- });
- ws.onerror = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/cookies/001.html b/testing/web-platform/tests/websockets/cookies/001.html
deleted file mode 100644
index 4f3514a20..000000000
--- a/testing/web-platform/tests/websockets/cookies/001.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<title>WebSockets: Cookie in request</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var cookie_id = ((new Date())-0) + '.' + Math.random();
-async_test(function(t) {
- if (window.WebSocket) {
- document.cookie = 'ws_test_'+cookie_id+'=test; Path=/';
- }
- t.add_cleanup(function() {
- // remove cookie
- document.cookie = 'ws_test_'+cookie_id+'=; Path=/; Expires=Sun, 06 Nov 1994 08:49:37 GMT';
- });
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-cookie');
- ws.onmessage = t.step_func(function(e) {
- assert_regexp_match(e.data, new RegExp('ws_test_'+cookie_id+'=test'));
- ws.close();
- t.done();
- });
- ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/cookies/002.html b/testing/web-platform/tests/websockets/cookies/002.html
deleted file mode 100644
index 934d4e936..000000000
--- a/testing/web-platform/tests/websockets/cookies/002.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<title>WebSockets: Set-Cookie in response</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var cookie_id = ((new Date())-0) + '.' + Math.random();
-async_test(function(t) {
- t.add_cleanup(function() {
- // remove cookie
- document.cookie = 'ws_test_'+cookie_id+'=; Path=/; Expires=Sun, 06 Nov 1994 08:49:37 GMT';
- });
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/set-cookie?'+cookie_id);
- ws.onopen = t.step_func(function(e) {
- assert_regexp_match(document.cookie, new RegExp('ws_test_'+cookie_id+'=test'));
- ws.close();
- t.done();
- });
- ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/cookies/003.html b/testing/web-platform/tests/websockets/cookies/003.html
deleted file mode 100644
index eb27437e5..000000000
--- a/testing/web-platform/tests/websockets/cookies/003.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!doctype html>
-<title>WebSockets: sending HttpOnly cookies in ws request</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-setup({explict_done:true})
-var cookie_id = ((new Date())-0) + '.' + Math.random();
-
-var t = async_test(function(t) {
- var iframe = document.createElement('iframe');
- t.add_cleanup(function() {
- // remove cookie
- iframe.src = 'support/set-cookie.py?'+encodeURIComponent('ws_test_'+cookie_id+'=; Path=/; HttpOnly; Expires=Sun, 06 Nov 1994 08:49:37 GMT');
- iframe.onload = done;
- });
- iframe.src = 'support/set-cookie.py?'+encodeURIComponent('ws_test_'+cookie_id+'=test; Path=/; HttpOnly');
- iframe.onload = t.step_func(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-cookie');
- ws.onmessage = t.step_func(function(e) {
- ws.close();
- assert_regexp_match(e.data, new RegExp('ws_test_'+cookie_id+'=test'));
- t.done();
- });
- ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
- });
- document.body.appendChild(iframe);
-}, null, {timeout:9900});
-</script>
diff --git a/testing/web-platform/tests/websockets/cookies/004.html b/testing/web-platform/tests/websockets/cookies/004.html
deleted file mode 100644
index c172892b3..000000000
--- a/testing/web-platform/tests/websockets/cookies/004.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting HttpOnly cookies in ws response, checking document.cookie</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-setup({explicit_done:true})
-var cookie_id = ((new Date())-0) + '.' + Math.random();
-
-var t = async_test(function(t) {
- var iframe = document.createElement('iframe');
- t.add_cleanup(function() {
- // remove cookie
- iframe.src = 'support/set-cookie.py?'+encodeURIComponent('ws_test_'+cookie_id+'=; Path=/; HttpOnly; Expires=Sun, 06 Nov 1994 08:49:37 GMT');
- iframe.onload = done;
- });
- var url = SCHEME_DOMAIN_PORT+'/set-cookie_http?'+cookie_id;
- var ws = new WebSocket(url);
- ws.onopen = t.step_func(function(e) {
- ws.close();
- assert_false(new RegExp('ws_test_'+cookie_id+'=test').test(document.cookie));
- t.done();
- });
- ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
- document.body.appendChild(iframe);
-}, null, {timeout:9900})
-</script>
diff --git a/testing/web-platform/tests/websockets/cookies/005.html b/testing/web-platform/tests/websockets/cookies/005.html
deleted file mode 100644
index 731fbfa12..000000000
--- a/testing/web-platform/tests/websockets/cookies/005.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting HttpOnly cookies in ws response, checking ws request</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-setup({explicit_done:true})
-var cookie_id = ((new Date())-0) + '.' + Math.random();
-
-var t = async_test(function(t) {
- var iframe = document.createElement('iframe');
- t.add_cleanup(function() {
- // remove cookie
- iframe.src = 'support/set-cookie.py?'+encodeURIComponent('ws_test_'+cookie_id+'=; Path=/; HttpOnly; Expires=Sun, 06 Nov 1994 08:49:37 GMT');
- iframe.onload = done;
- });
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/set-cookie_http?'+cookie_id);
- ws.onopen = t.step_func(function(e) {
- var ws2 = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-cookie');
- ws2.onmessage = t.step_func(function(e) {
- ws.close();
- ws2.close();
- assert_regexp_match(e.data, new RegExp('ws_test_'+cookie_id+'=test'));
- t.done();
- });
- });
- ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
- document.body.appendChild(iframe);
-})
-</script>
diff --git a/testing/web-platform/tests/websockets/cookies/006.html b/testing/web-platform/tests/websockets/cookies/006.html
deleted file mode 100644
index 7e975879a..000000000
--- a/testing/web-platform/tests/websockets/cookies/006.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting Secure cookie with document.cookie, checking ws request</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var cookie_id = ((new Date())-0) + '.' + Math.random();
-async_test(function(t) {
- if (window.WebSocket) {
- document.cookie = 'ws_test_'+cookie_id+'=test; Path=/; Secure';
- }
- t.add_cleanup(function() {
- // remove cookie
- document.cookie = 'ws_test_'+cookie_id+'=; Path=/; Secure; Expires=Sun, 06 Nov 1994 08:49:37 GMT';
- });
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo-cookie');
- ws.onmessage = t.step_func(function(e) {
- ws.close();
- if (SCHEME_DOMAIN_PORT.substr(0,3) == 'wss') {
- assert_regexp_match(e.data, new RegExp('ws_test_'+cookie_id+'=test'));
- } else {
- assert_false(new RegExp('ws_test_'+cookie_id+'=test').test(e.data));
- }
- t.done();
- })
- ws.onerror = ws.onclose = t.step_func(function(e) {assert_unreached(e.type)});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/cookies/007.html b/testing/web-platform/tests/websockets/cookies/007.html
deleted file mode 100644
index f4fc8c640..000000000
--- a/testing/web-platform/tests/websockets/cookies/007.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!doctype html>
-<title>WebSockets: when to process set-cookie fields in ws response</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var cookie_id = ((new Date())-0) + '.' + Math.random();
-async_test(function(t) {
- t.add_cleanup(function() {
- // remove cookie
- document.cookie = 'ws_test_'+cookie_id+'; Path=/; Expires=Sun, 06 Nov 1994 08:49:37 GMT';
- });
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/set-cookie?'+cookie_id);
- ws.onopen = t.step_func(function(e) {
- ws.close();
- assert_regexp_match(document.cookie, new RegExp('ws_test_'+cookie_id+'=test'));
- t.done();
- });
- ws.onerror = ws.onclose = t.step_func(function() {assert_unreached()});
-
- // sleep for 2 seconds with sync xhr
- var sleep = new XMLHttpRequest();
- sleep.open('GET', '/common/blank.html?pipe=trickle(d2)', false);
- sleep.send(null);
-
- if (new RegExp('ws_test_'+cookie_id+'=test').test(document.cookie)) {
- assert_unreached('cookie was set during script execution');
- }
-}, null, {timeout:12000});
-</script>
diff --git a/testing/web-platform/tests/websockets/cookies/support/set-cookie.py b/testing/web-platform/tests/websockets/cookies/support/set-cookie.py
deleted file mode 100644
index 8a47d7cdd..000000000
--- a/testing/web-platform/tests/websockets/cookies/support/set-cookie.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import urllib
-
-def main(request, response):
- response.headers.set('Set-Cookie', urllib.unquote(request.url_parts.query))
- return [("Content-Type", "text/plain")], ""
diff --git a/testing/web-platform/tests/websockets/eventhandlers.html b/testing/web-platform/tests/websockets/eventhandlers.html
deleted file mode 100644
index 95aeb0b12..000000000
--- a/testing/web-platform/tests/websockets/eventhandlers.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<title>WebSocket event handlers</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="websocket.sub.js"></script>
-<div id="log"></div>
-<script>
-function testEventHandler(name) {
- test(function() {
- var ws = new WebSocket("ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH,
- "echo")
- assert_equals(ws["on" + name], null);
- ws["on" + name] = function() {};
- ws["on" + name] = 2;
- assert_equals(ws["on" + name], null);
- }, "Event handler for " + name + " should have [TreatNonCallableAsNull]")
-}
-["open", "error", "close", "message"].forEach(testEventHandler);
-</script>
diff --git a/testing/web-platform/tests/websockets/extended-payload-length.html b/testing/web-platform/tests/websockets/extended-payload-length.html
deleted file mode 100644
index 9e586a98d..000000000
--- a/testing/web-platform/tests/websockets/extended-payload-length.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!doctype html>
-<title>WebSockets : Boundary-value tests for the 'Extended payload length' field in RFC6455 section5.2 'Base Framing Protocol'</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var datasize = 125;
- var data = null;
- ws.onopen = t.step_func(function(e) {
- data = new Array(datasize + 1).join('a');
- ws.send(data);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, data);
- t.done();
- });
-}, "Application data is 125 byte which means any 'Extended payload length' field isn't used at all.", {timeout:20000});
-
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var datasize = 126;
- var data = null;
- ws.onopen = t.step_func(function(e) {
- data = new Array(datasize + 1).join('a');
- ws.send(data);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, data);
- t.done();
- });
-}, "Application data is 126 byte which starts to use the 16 bit 'Extended payload length' field.", {timeout:20000});
-
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var datasize = 0xFFFF;
- var data = null;
- ws.onopen = t.step_func(function(e) {
- data = new Array(datasize + 1).join('a');
- ws.send(data);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, data);
- t.done();
- });
-}, "Application data is 0xFFFF byte which means the upper bound of the 16 bit 'Extended payload length' field.", {timeout:20000});
-
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var datasize = 0xFFFF + 1;
- var data = null;
- ws.onopen = t.step_func(function(e) {
- data = new Array(datasize + 1).join('a');
- ws.send(data);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, data);
- t.done();
- });
-}, "Application data is (0xFFFF + 1) byte which starts to use the 64 bit 'Extended payload length' field", {timeout:20000});
-
-</script>
diff --git a/testing/web-platform/tests/websockets/handlers/echo-cookie_wsh.py b/testing/web-platform/tests/websockets/handlers/echo-cookie_wsh.py
deleted file mode 100755
index 367d03190..000000000
--- a/testing/web-platform/tests/websockets/handlers/echo-cookie_wsh.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil
-
-def web_socket_do_extra_handshake(request):
- request.ws_cookie = request.headers_in.get('Cookie')
-
-def web_socket_transfer_data(request):
- if request.ws_cookie is not None:
- msgutil.send_message(request, request.ws_cookie)
- else:
- msgutil.send_message(request, '(none)')
diff --git a/testing/web-platform/tests/websockets/handlers/echo-query_v13_wsh.py b/testing/web-platform/tests/websockets/handlers/echo-query_v13_wsh.py
deleted file mode 100755
index 4083c49bc..000000000
--- a/testing/web-platform/tests/websockets/handlers/echo-query_v13_wsh.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil, util
-
-def web_socket_do_extra_handshake(request):
- pass
-
-def web_socket_transfer_data(request):
- while True:
- msgutil.send_message(request, request.unparsed_uri.split('?')[1] or '')
- return
diff --git a/testing/web-platform/tests/websockets/handlers/echo-query_wsh.py b/testing/web-platform/tests/websockets/handlers/echo-query_wsh.py
deleted file mode 100755
index 8fd7ac36b..000000000
--- a/testing/web-platform/tests/websockets/handlers/echo-query_wsh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil, util
-
-def web_socket_do_extra_handshake(request):
- pass # Always accept.
-
-def web_socket_transfer_data(request):
- msgutil.send_message(request, request.unparsed_uri.split('?', 1)[1] or '')
diff --git a/testing/web-platform/tests/websockets/handlers/echo_close_data_wsh.py b/testing/web-platform/tests/websockets/handlers/echo_close_data_wsh.py
deleted file mode 100755
index 4da4ce61f..000000000
--- a/testing/web-platform/tests/websockets/handlers/echo_close_data_wsh.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/python
-from mod_pywebsocket import msgutil
-
-_GOODBYE_MESSAGE = u'Goodbye'
-
-def web_socket_do_extra_handshake(request):
- # This example handler accepts any request. See origin_check_wsh.py for how
- # to reject access from untrusted scripts based on origin value.
-
- pass # Always accept.
-
-
-def web_socket_transfer_data(request):
- while True:
- line = request.ws_stream.receive_message()
- if line is None:
- return
- if isinstance(line, unicode):
- if line == _GOODBYE_MESSAGE:
- return
- request.ws_stream.send_message(line, binary=False)
-
diff --git a/testing/web-platform/tests/websockets/handlers/echo_exit_wsh.py b/testing/web-platform/tests/websockets/handlers/echo_exit_wsh.py
deleted file mode 100755
index 200b92e58..000000000
--- a/testing/web-platform/tests/websockets/handlers/echo_exit_wsh.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/python
-from mod_pywebsocket import msgutil
-
-_GOODBYE_MESSAGE = u'Goodbye'
-
-def web_socket_do_extra_handshake(request):
- # This example handler accepts any request. See origin_check_wsh.py for how
- # to reject access from untrusted scripts based on origin value.
-
- pass # Always accept.
-
-
-def web_socket_transfer_data(request):
- while True:
- line = request.ws_stream.receive_message()
- if line is None:
- return
- if isinstance(line, unicode):
- if line == _GOODBYE_MESSAGE:
- return
-
diff --git a/testing/web-platform/tests/websockets/handlers/echo_raw_wsh.py b/testing/web-platform/tests/websockets/handlers/echo_raw_wsh.py
deleted file mode 100755
index c3a030c96..000000000
--- a/testing/web-platform/tests/websockets/handlers/echo_raw_wsh.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil
-import urllib
-
-
-def web_socket_do_extra_handshake(request):
- pass # Always accept.
-
-def web_socket_transfer_data(request):
- while True:
- line = msgutil.receive_message(request)
- if line == 'exit':
- return
- request.connection.write(line.decode("string-escape"))
diff --git a/testing/web-platform/tests/websockets/handlers/echo_wsh.py b/testing/web-platform/tests/websockets/handlers/echo_wsh.py
deleted file mode 100755
index 41bcd1694..000000000
--- a/testing/web-platform/tests/websockets/handlers/echo_wsh.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/python
-from mod_pywebsocket import msgutil
-from mod_pywebsocket import common
-
-_GOODBYE_MESSAGE = u'Goodbye'
-
-def web_socket_do_extra_handshake(request):
- # This example handler accepts any request. See origin_check_wsh.py for how
- # to reject access from untrusted scripts based on origin value.
- if request.ws_requested_protocols:
- if "echo" in request.ws_requested_protocols:
- request.ws_protocol = "echo"
-
-
-def web_socket_transfer_data(request):
- while True:
- line = request.ws_stream.receive_message()
- if line is None:
- return
- if isinstance(line, unicode):
- request.ws_stream.send_message(line, binary=False)
- if line == _GOODBYE_MESSAGE:
- return
- else:
- request.ws_stream.send_message(line, binary=True)
-
-def web_socket_passive_closing_handshake(request):
- # Echo close status code and reason
- code, reason = request.ws_close_code, request.ws_close_reason
-
- # No status received is a reserved pseudo code representing an empty code,
- # so echo back an empty code in this case.
- if code == common.STATUS_NO_STATUS_RECEIVED:
- code = None
-
- return code, reason
diff --git a/testing/web-platform/tests/websockets/handlers/empty-message_wsh.py b/testing/web-platform/tests/websockets/handlers/empty-message_wsh.py
deleted file mode 100755
index 0eb107f0b..000000000
--- a/testing/web-platform/tests/websockets/handlers/empty-message_wsh.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil
-
-def web_socket_do_extra_handshake(request):
- pass # Always accept.
-
-def web_socket_transfer_data(request):
- line = msgutil.receive_message(request)
- if line == "":
- msgutil.send_message(request, 'pass')
- else:
- msgutil.send_message(request, 'fail')
diff --git a/testing/web-platform/tests/websockets/handlers/handshake_no_protocol_wsh.py b/testing/web-platform/tests/websockets/handlers/handshake_no_protocol_wsh.py
deleted file mode 100755
index 3e6b8e664..000000000
--- a/testing/web-platform/tests/websockets/handlers/handshake_no_protocol_wsh.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import common, msgutil, util
-from mod_pywebsocket.handshake import hybi
-
-def web_socket_do_extra_handshake(request):
- request.connection.write('HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin+'\x0D\x0ASec-WebSocket-Accept: '+hybi.compute_accept(request.headers_in.get(common.SEC_WEBSOCKET_KEY_HEADER))[0]+'\x0D\x0A\x0D\x0A')
- return
-
-def web_socket_transfer_data(request):
- while True:
- return
diff --git a/testing/web-platform/tests/websockets/handlers/handshake_protocol_wsh.py b/testing/web-platform/tests/websockets/handlers/handshake_protocol_wsh.py
deleted file mode 100755
index d3ebb273d..000000000
--- a/testing/web-platform/tests/websockets/handlers/handshake_protocol_wsh.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import common, msgutil, util
-from mod_pywebsocket.handshake import hybi
-
-def web_socket_do_extra_handshake(request):
- request.connection.write('HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASec-WebSocket-Protocol: foobar\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin+'\x0D\x0ASec-WebSocket-Accept: '+hybi.compute_accept(request.headers_in.get(common.SEC_WEBSOCKET_KEY_HEADER))[0]+'\x0D\x0A\x0D\x0A')
- return
-
-def web_socket_transfer_data(request):
- while True:
- return \ No newline at end of file
diff --git a/testing/web-platform/tests/websockets/handlers/handshake_sleep_2_wsh.py b/testing/web-platform/tests/websockets/handlers/handshake_sleep_2_wsh.py
deleted file mode 100755
index 3367ed8f8..000000000
--- a/testing/web-platform/tests/websockets/handlers/handshake_sleep_2_wsh.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil
-import time
-
-def web_socket_do_extra_handshake(request):
- time.sleep(2)
-
-def web_socket_transfer_data(request):
- pass
diff --git a/testing/web-platform/tests/websockets/handlers/invalid_wsh.py b/testing/web-platform/tests/websockets/handlers/invalid_wsh.py
deleted file mode 100755
index 886e970b8..000000000
--- a/testing/web-platform/tests/websockets/handlers/invalid_wsh.py
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil
-
-def web_socket_do_extra_handshake(request):
- request.connection.write("FOO BAR BAZ\r\n\r\n")
-
-def web_socket_transfer_data(request):
- pass
diff --git a/testing/web-platform/tests/websockets/handlers/origin_wsh.py b/testing/web-platform/tests/websockets/handlers/origin_wsh.py
deleted file mode 100755
index ce5f3a7f6..000000000
--- a/testing/web-platform/tests/websockets/handlers/origin_wsh.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil
-
-
-def web_socket_do_extra_handshake(request):
- pass # Always accept.
-
-
-def web_socket_transfer_data(request):
- msgutil.send_message(request, request.ws_origin)
diff --git a/testing/web-platform/tests/websockets/handlers/protocol_array_wsh.py b/testing/web-platform/tests/websockets/handlers/protocol_array_wsh.py
deleted file mode 100755
index 5d46c588c..000000000
--- a/testing/web-platform/tests/websockets/handlers/protocol_array_wsh.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil, util
-
-def web_socket_do_extra_handshake(request):
- line = request.headers_in.get('Sec-WebSocket-Protocol')
- request.ws_protocol = line.split(',', 1)[0]
-
-#pass
-
-def web_socket_transfer_data(request):
- while True:
- msgutil.send_message(request, request.ws_protocol)
- return
diff --git a/testing/web-platform/tests/websockets/handlers/protocol_wsh.py b/testing/web-platform/tests/websockets/handlers/protocol_wsh.py
deleted file mode 100755
index 96a452584..000000000
--- a/testing/web-platform/tests/websockets/handlers/protocol_wsh.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import msgutil, util
-
-def web_socket_do_extra_handshake(request):
- request.ws_protocol = request.headers_in.get('Sec-WebSocket-Protocol')
-#pass
-
-def web_socket_transfer_data(request):
- while True:
- msgutil.send_message(request, request.ws_protocol)
- return
diff --git a/testing/web-platform/tests/websockets/handlers/set-cookie-secure_wsh.py b/testing/web-platform/tests/websockets/handlers/set-cookie-secure_wsh.py
deleted file mode 100755
index 0daf72856..000000000
--- a/testing/web-platform/tests/websockets/handlers/set-cookie-secure_wsh.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/python
-import urlparse
-
-from mod_pywebsocket import common, msgutil, util
-from mod_pywebsocket.handshake import hybi
-
-
-def web_socket_do_extra_handshake(request):
- url_parts = urlparse.urlsplit(request.uri)
- request.connection.write('HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASet-Cookie: ws_test_'+(url_parts.query or '')+'=test; Secure; Path=/\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin+'\x0D\x0ASec-WebSocket-Accept: '+hybi.compute_accept(request.headers_in.get(common.SEC_WEBSOCKET_KEY_HEADER))[0]+'\x0D\x0A\x0D\x0A')
- return
-
-def web_socket_transfer_data(request):
- while True:
- return
diff --git a/testing/web-platform/tests/websockets/handlers/set-cookie_http_wsh.py b/testing/web-platform/tests/websockets/handlers/set-cookie_http_wsh.py
deleted file mode 100755
index 147842457..000000000
--- a/testing/web-platform/tests/websockets/handlers/set-cookie_http_wsh.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import common, msgutil, util
-from mod_pywebsocket.handshake import hybi
-import urlparse
-
-def web_socket_do_extra_handshake(request):
- url_parts = urlparse.urlsplit(request.uri)
- request.connection.write('HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASet-Cookie: ws_test_'+(url_parts.query or '')+'=test; Path=/; HttpOnly\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin+'\x0D\x0ASec-WebSocket-Accept: '+hybi.compute_accept(request.headers_in.get(common.SEC_WEBSOCKET_KEY_HEADER))[0]+'\x0D\x0A\x0D\x0A')
- return
-
-def web_socket_transfer_data(request):
- while True:
- return
diff --git a/testing/web-platform/tests/websockets/handlers/set-cookie_wsh.py b/testing/web-platform/tests/websockets/handlers/set-cookie_wsh.py
deleted file mode 100755
index b0e650476..000000000
--- a/testing/web-platform/tests/websockets/handlers/set-cookie_wsh.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/python
-import urlparse
-
-from mod_pywebsocket import common, msgutil, util
-from mod_pywebsocket.handshake import hybi
-
-
-def web_socket_do_extra_handshake(request):
- url_parts = urlparse.urlsplit(request.uri)
- request.connection.write('HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASet-Cookie: ws_test_'+(url_parts.query or '')+'=test; Path=/\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin+'\x0D\x0ASec-WebSocket-Accept: '+hybi.compute_accept(request.headers_in.get(common.SEC_WEBSOCKET_KEY_HEADER))[0]+'\x0D\x0A\x0D\x0A')
- return
-
-def web_socket_transfer_data(request):
- while True:
- return
diff --git a/testing/web-platform/tests/websockets/handlers/simple_handshake_wsh.py b/testing/web-platform/tests/websockets/handlers/simple_handshake_wsh.py
deleted file mode 100755
index 075009907..000000000
--- a/testing/web-platform/tests/websockets/handlers/simple_handshake_wsh.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/python
-
-from mod_pywebsocket import common, msgutil, util
-from mod_pywebsocket.handshake import hybi
-
-
-def web_socket_do_extra_handshake(request):
- request.connection.write('HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASet-Cookie: ws_test=test\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin+'\x0D\x0ASec-WebSocket-Accept: '+hybi.compute_accept(request.headers_in.get(common.SEC_WEBSOCKET_KEY_HEADER))[0]+'\x0D\x0A\x0D\x0A')
- return
-
-def web_socket_transfer_data(request):
- while True:
- return
diff --git a/testing/web-platform/tests/websockets/handlers/sleep_10_v13_wsh.py b/testing/web-platform/tests/websockets/handlers/sleep_10_v13_wsh.py
deleted file mode 100755
index e1a6d9640..000000000
--- a/testing/web-platform/tests/websockets/handlers/sleep_10_v13_wsh.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/python
-
-import sys, urllib, time
-from mod_pywebsocket import common, msgutil, util
-
-def web_socket_do_extra_handshake(request):
- request.connection.write('x')
- time.sleep(2)
- request.connection.write('x')
- time.sleep(2)
- request.connection.write('x')
- time.sleep(2)
- request.connection.write('x')
- time.sleep(2)
- request.connection.write('x')
- time.sleep(2)
- return
-
-def web_socket_transfer_data(request):
- while True:
- line = msgutil.receive_message(request)
- if line == 'Goodbye':
- return
- request.ws_stream.send_message(line, binary=False)
-
diff --git a/testing/web-platform/tests/websockets/handlers/stash_responder_wsh.py b/testing/web-platform/tests/websockets/handlers/stash_responder_wsh.py
deleted file mode 100644
index bc6f4fd6e..000000000
--- a/testing/web-platform/tests/websockets/handlers/stash_responder_wsh.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/python
-import urlparse, json
-from mod_pywebsocket import common, msgutil, util
-from mod_pywebsocket.handshake import hybi
-from wptserve import stash
-
-address, authkey = stash.load_env_config()
-stash = stash.Stash("/stash_responder", address=address, authkey=authkey)
-
-def web_socket_do_extra_handshake(request):
- return
-
-def web_socket_transfer_data(request):
- while True:
- line = request.ws_stream.receive_message()
- if line == "echo":
- query = request.unparsed_uri.split('?')[1]
- GET = dict(urlparse.parse_qsl(query))
-
- # TODO(kristijanburnik): This code should be reused from
- # /mixed-content/generic/expect.py or implemented more generally
- # for other tests.
- path = GET.get("path", request.unparsed_uri.split('?')[0])
- key = GET["key"]
- action = GET["action"]
-
- if action == "put":
- value = GET["value"]
- stash.take(key=key, path=path)
- stash.put(key=key, value=value, path=path)
- response_data = json.dumps({"status": "success", "result": key})
- elif action == "purge":
- value = stash.take(key=key, path=path)
- response_data = json.dumps({"status": "success", "result": value})
- elif action == "take":
- value = stash.take(key=key, path=path)
- if value is None:
- status = "allowed"
- else:
- status = "blocked"
- response_data = json.dumps({"status": status, "result": value})
-
- msgutil.send_message(request, response_data)
-
- return
diff --git a/testing/web-platform/tests/websockets/handlers/wrong_accept_key_wsh.py b/testing/web-platform/tests/websockets/handlers/wrong_accept_key_wsh.py
deleted file mode 100755
index f504a81f4..000000000
--- a/testing/web-platform/tests/websockets/handlers/wrong_accept_key_wsh.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/python
-
-import sys, urllib, time
-from mod_pywebsocket import common, msgutil, util
-
-def web_socket_do_extra_handshake(request):
- request.connection.write('HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin+'\x0D\x0ASec-WebSocket-Accept: thisisawrongacceptkey\x0D\x0A\x0D\x0A')
- return
-
-def web_socket_transfer_data(request):
- while True:
- request.ws_stream.send_message('test', binary=False)
- return
diff --git a/testing/web-platform/tests/websockets/interfaces/CloseEvent/clean-close.html b/testing/web-platform/tests/websockets/interfaces/CloseEvent/clean-close.html
deleted file mode 100644
index acc718516..000000000
--- a/testing/web-platform/tests/websockets/interfaces/CloseEvent/clean-close.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<title>WebSockets: wasClean, true</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.send('Test');
- });
- ws.onmessage = t.step_func(function(e) {
- ws.close();
- });
- ws.onclose = t.step_func(function(e) {
- assert_equals(e.wasClean,true);
- t.done();
- });
-}, null, {timeout:2000});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/CloseEvent/constructor.html b/testing/web-platform/tests/websockets/interfaces/CloseEvent/constructor.html
deleted file mode 100644
index 1ed86bdf8..000000000
--- a/testing/web-platform/tests/websockets/interfaces/CloseEvent/constructor.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>CloseEvent: constructor</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<div id=log></div>
-<script>
-test(function() {
- var event = new CloseEvent("foo");
- assert_true(event instanceof CloseEvent, "should be a CloseEvent");
- assert_equals(event.type, "foo");
- assert_false(event.bubbles, "bubbles");
- assert_false(event.cancelable, "cancelable");
- assert_false(event.wasClean, "wasClean");
- assert_equals(event.code, 0);
- assert_equals(event.reason, "");
-}, "new CloseEvent() without dictionary");
-
-test(function() {
- var event = new CloseEvent("foo", {
- bubbles: true,
- cancelable: true,
- wasClean: true,
- code: 7,
- reason: "x",
- });
- assert_true(event instanceof CloseEvent, "should be a CloseEvent");
- assert_equals(event.type, "foo");
- assert_true(event.bubbles, "bubbles");
- assert_true(event.cancelable, "cancelable");
- assert_true(event.wasClean, "wasClean");
- assert_equals(event.code, 7);
- assert_equals(event.reason, "x");
-}, "new CloseEvent() with dictionary");
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/CloseEvent/historical.html b/testing/web-platform/tests/websockets/interfaces/CloseEvent/historical.html
deleted file mode 100644
index 24528a86f..000000000
--- a/testing/web-platform/tests/websockets/interfaces/CloseEvent/historical.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>CloseEvent: historical initialization</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<div id=log></div>
-<script>
-test(function() {
- assert_false("initCloseEvent" in CloseEvent.prototype);
- assert_false("initCloseEvent" in new CloseEvent('close'));
-}, "initCloseEvent");
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer.html
deleted file mode 100644
index faf09783a..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-arraybuffer.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: bufferedAmount for ArrayBuffer</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var datasize = 10;
- ws.onopen = t.step_func(function(e) {
- ws.binaryType = "arraybuffer";
- var data = new ArrayBuffer(datasize);
- ws.send(data);
- assert_equals(ws.bufferedAmount, data.byteLength);
- })
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data.byteLength, datasize);
- t.done();
- })
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob.html
deleted file mode 100644
index 3af1d93a7..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-blob.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: bufferedAmount for blob</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var datasize = 10;
- ws.onopen = t.step_func(function(e) {
- ws.binaryType = "blob";
- var data = new ArrayBuffer(datasize);
- ws.send(data);
- assert_equals(ws.bufferedAmount, data.byteLength);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_true(e.data instanceof Blob);
- assert_equals(e.data.size, datasize);
- t.done();
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html
deleted file mode 100644
index a6bd53015..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: defineProperty getter for bufferedAmount</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(){
- Object.defineProperty(WebSocket.prototype, 'bufferedAmount', {
- get: function() { return 'foo'; }
- });
- var ws = new WebSocket('ws://example.invalid/');
- assert_equals(ws.bufferedAmount, 'foo');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-setter.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-setter.html
deleted file mode 100644
index feddfb90e..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-setter.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: defineProperty setter for bufferedAmount</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- window.setter_ran = false;
- Object.defineProperty(WebSocket.prototype, 'bufferedAmount', {
- set: function(v) { window[v] = true; }
- });
- var ws = new WebSocket('ws://example.invalid/');
- ws.bufferedAmount = 'setter_ran';
- assert_true(setter_ran);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting.html
deleted file mode 100644
index 68c47e490..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-deleting.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: delete bufferedAmount</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- assert_equals(ws.bufferedAmount, 0, 'after creation');
- ws.close();
- delete ws.bufferedAmount;
- assert_equals(ws.bufferedAmount, 0,
- 'after attempt to delete ws.bufferedAmount');
- delete WebSocket.prototype.bufferedAmount;
- assert_equals(ws.bufferedAmount, undefined,
- 'after attempt to delete WebSocket.prototype.bufferedAmount');
-});
-</script>
-
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-getting.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-getting.html
deleted file mode 100644
index 0398b0a9c..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-getting.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: bufferedAmount after send()ing</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- // bufferedAmount should increase sync in the send() method and decrease between
- // events in the event loop (so never while script is running).
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.send('x');
- assert_equals(ws.bufferedAmount, 1, 'bufferedAmount after sent "x"');
- ws.send('\u00E5');
- assert_equals(ws.bufferedAmount, 1+2, 'bufferedAmount after sent "x", "\u00E5"');
- ws.send('\u5336');
- assert_equals(ws.bufferedAmount, 1+2+3, 'bufferedAmount after sent "x", "\u00E5", "\u5336"');
- ws.send('\uD801\uDC7E');
- assert_equals(ws.bufferedAmount, 1+2+3+4, 'bufferedAmount after sent "x", "\u00E5", "\u5336", "\uD801\uDC7E"');
- })
- var i = 0;
- ws.onmessage = t.step_func(function(e) {
- i++;
- switch(i) {
- case 1:
- assert_equals(e.data, 'x');
- assert_true(ws.bufferedAmount < 2+3+4 + 1, 'bufferedAmount after received "x"');
- break;
- case 2:
- assert_equals(e.data, '\u00E5');
- assert_true(ws.bufferedAmount < 3+4 + 1, 'bufferedAmount after received "x", "\u00E5"');
- break;
- case 3:
- assert_equals(e.data, '\u5336');
- assert_true(ws.bufferedAmount < 4 + 1, 'bufferedAmount after received "x", "\u00E5", "\u5336"');
- break;
- case 4:
- assert_equals(e.data, '\uD801\uDC7E');
- assert_equals(ws.bufferedAmount, 0, 'bufferedAmount after received "x", "\u00E5", "\u5336", "\uD801\uDC7E"');
- t.done();
- break;
- default:
- assert_unreached(i);
- }
- })
- ws.onerror = ws.onclose = t.step_func(function() {assert_unreached()});
-});
-</script>
-
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-initial.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-initial.html
deleted file mode 100644
index 55e9cf9e9..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-initial.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: getting bufferedAmount</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals(ws.bufferedAmount, 0);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html
deleted file mode 100644
index 677423736..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-large.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: bufferedAmount for 65K data</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var data = "";
- ws.onopen = t.step_func(function(e) {
- for (var i = 0; i < 65000; i++) {
- data = data + "x";
- }
- ws.send(data);
- assert_equals(data.length, ws.bufferedAmount);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, data);
- t.done();
- })
-}, null, {timeout:20000});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-readonly.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-readonly.html
deleted file mode 100644
index 8200b7504..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-readonly.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: setting bufferedAmount</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- ws.bufferedAmount = 5;
- assert_equals(ws.bufferedAmount, 0);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode.html
deleted file mode 100644
index 49b1330c9..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-unicode.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>WebSockets: bufferedAmount for unicode data</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var data = "¥¥¥¥¥¥";
- ws.onopen = t.step_func(function(e) {
- ws.send(data);
- assert_equals(data.length * 2, ws.bufferedAmount);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, data);
- t.done();
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-basic.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-basic.html
deleted file mode 100644
index ab6c93b61..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-basic.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<title>WebSockets: close()</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- ws.onclose = t.step_func(function(e) {
- assert_equals(e instanceof CloseEvent, true, 'e instanceof CloseEvent');
- assert_equals(e.wasClean, false, 'e.wasClean');
- e.wasClean = true;
- assert_equals(e.wasClean, false, 'e.wasClean = true');
- delete e.wasClean;
- assert_equals(e.wasClean, false, 'delete e.wasClean');
- delete CloseEvent.prototype.wasClean;
- assert_equals(e.wasClean, undefined, 'delete CloseEvent.prototype.wasClean');
- t.done();
- });
- ws.close();
- assert_equals(ws.readyState, ws.CLOSING);
-}, undefined, {timeout:9900});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-connecting.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-connecting.html
deleted file mode 100644
index 2a1104439..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-connecting.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<title>WebSockets: close() when connecting</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/sleep_10_v13');
- setTimeout(t.step_func(function() {
- assert_equals(ws.readyState, ws.CONNECTING);
- ws.close();
- assert_equals(ws.readyState, ws.CLOSING);
- ws.onclose = t.step_func(function(e) {
- assert_equals(ws.readyState, ws.CLOSED);
- assert_equals(e.wasClean, false);
- t.done();
- });
- }), 1000);
- ws.onopen = ws.onclose = t.step_func(assert_unreached);
-}, undefined, {timeout:12000});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-multiple.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-multiple.html
deleted file mode 100644
index d64ac694f..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-multiple.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html>
-<title>WebSockets: close() several times</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var i = 0;
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- ws.onclose = t.step_func(function(e) {
- i++;
- });
- ws.close();
- ws.close();
- ws.close();
- var f = t.step_func(function() {
- if (i < 1) {
- setTimeout(f, 500);
- return;
- }
- assert_equals(i, 1);
- t.done()
- });
- setTimeout(f, 500);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-nested.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-nested.html
deleted file mode 100644
index d66495a69..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-nested.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<title>WebSockets: close() in close event handler</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- var i = 0;
- ws.onclose = t.step_func(function(e) {
- i++;
- if (i == 1) {
- assert_equals(ws.readyState, ws.CLOSED);
- ws.close();
- assert_equals(ws.readyState, ws.CLOSED);
- }
- setTimeout(t.step_func(function() {
- assert_equals(i, 1);
- t.done();
- }), 50);
- });
- ws.close();
- assert_equals(ws.readyState, ws.CLOSING);
-}, undefined, {timeout:9900});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-replace.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-replace.html
deleted file mode 100644
index a3d29d0c9..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-replace.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<title>WebSockets: replacing close</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- ws.close = 5;
- assert_equals(ws.close, 5);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-return.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-return.html
deleted file mode 100644
index c752c4224..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/close/close-return.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<title>WebSockets: close() return value</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals(ws.close(), undefined);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/001.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/001.html
deleted file mode 100644
index efc249aab..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/001.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting constants on constructor</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var constants = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
-for (var i = 0; i < constants.length; ++i) {
- test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals(WebSocket[constants[i]], i, 'WebSocket.'+constants[i]);
- }, "Constants on constructors " + constants[i]);
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/002.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/002.html
deleted file mode 100644
index 7280e09b4..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/002.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting constants</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-// this test is testing WebIDL stuff
-var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
-var constants = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
-for (var i = 0; i < constants.length; ++i) {
- test(function() {
- WebSocket[constants[i]] = 5; // should be ignored, has { ReadOnly }
- WebSocket.prototype[constants[i]] = 5; // should be ignored, has { ReadOnly }
- ws[constants[i]] = 5; // should be ignored, { ReadOnly } is inherited from prototype
- assert_equals(WebSocket[constants[i]], i, 'WebSocket.'+constants[i]);
- assert_equals(WebSocket.prototype[constants[i]], i, 'WebSocket.prototype.'+constants[i]);
- assert_equals(ws[constants[i]], i, 'ws.'+constants[i]);
- }, "Readonly constants " + constants[i]);
-};
-</script>
-
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/003.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/003.html
deleted file mode 100644
index cdb06e5eb..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/003.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<title>WebSockets: deleting constants</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var constants = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
-for (var i = 0; i < constants.length; ++i) {
- test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- delete WebSocket[constants[i]]; // should be ignored, has { DontDelete }
- delete WebSocket.prototype[constants[i]]; // should be ignored, has { DontDelete }
- delete ws[constants[i]]; // should be ignored, there is no such property on the object
- assert_equals(WebSocket[constants[i]], i, 'WebSocket.'+constants[i]);
- assert_equals(WebSocket.prototype[constants[i]], i, 'WebSocket.prototype.'+constants[i]);
- assert_equals(ws[constants[i]], i, 'ws.'+constants[i]);
- })
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/004.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/004.html
deleted file mode 100644
index a5b7649df..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/004.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting constants on prototype and object</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var constants = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
-for (var i = 0; i < constants.length; ++i) {
- test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals(WebSocket.prototype[constants[i]], i);
- }, 'WebSocket.prototype.'+constants[i]);
- test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals(ws[constants[i]], i);
- }, 'ws.'+constants[i]);
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/005.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/005.html
deleted file mode 100644
index b3c2e932e..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/005.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: defineProperty getter for constants</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var constants = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
-for (var i = 0; i < constants.length; ++i) {
- test(function() {
- assert_throws(new TypeError(), function() {
- Object.defineProperty(WebSocket.prototype, constants[i], {
- get: function() { return 'foo'; }
- });
- });
- }, "defineProperty getter " + constants[i]);
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/006.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/006.html
deleted file mode 100644
index 702193456..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/constants/006.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: defineProperty setter for constants</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var constants = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
-for (var i = 0; i < constants.length; ++i) {
- test(function() {
- assert_throws(new TypeError(), function(){
- Object.defineProperty(WebSocket.prototype, constants[i], {
- set: function() { return 'foo'; }
- });
- });
- }, "defineProperty setter " + constants[i])
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/001.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/001.html
deleted file mode 100644
index 4af7636bf..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/001.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting on*</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var events = ['open', 'message', 'error', 'close'];
-for (var i = 0; i < events.length; ++i) {
- test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals(ws['on'+events[i]], null, 'on'+events[i]);
- });
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/002.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/002.html
deleted file mode 100644
index 279e0c580..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/002.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting on*</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var events = ['open', 'message', 'error', 'close'];
-for (var i = 0; i < events.length; ++i) {
- test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- var foo = function () {};
- ws['on'+events[i]] = foo;
- assert_equals(ws['on'+events[i]], foo);
- });
-}
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/003.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/003.html
deleted file mode 100644
index a9b76d84f..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/003.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<title>WebSockets: listening for events with onopen</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- var foo = t.step_func(function (e) {
- if (e.detail == 5)
- t.done();
- })
- ws.onopen = foo;
- var ev = document.createEvent('UIEvents');
- ev.initUIEvent('open', false, false, window, 5);
- ws.dispatchEvent(ev);
-}, null, {timeout:2000});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/004.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/004.html
deleted file mode 100644
index 0c384a6cf..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/004.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<title>WebSockets: members of EventTarget</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals(typeof ws.addEventListener, 'function');
- assert_equals(typeof ws.removeEventListener, 'function');
- assert_equals(typeof ws.dispatchEvent, 'function');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/006.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/006.html
deleted file mode 100644
index f7ccf1030..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/006.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<title>WebSockets: 'on*' in ws</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals('onopen' in ws, true, 'onopen');
- assert_equals('onmessage' in ws, true, 'onmessage');
- assert_equals('onerror' in ws, true, 'onerror');
- assert_equals('onclose' in ws, true, 'onclose');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/007.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/007.html
deleted file mode 100644
index 4305097d1..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/007.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<title>WebSockets: listening for events with onmessage</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- var foo = t.step_func(function (e) {
- if (e.detail == 5)
- t.done();
- })
- ws.onmessage = foo;
- var ev = document.createEvent('UIEvents');
- ev.initUIEvent('message', false, false, window, 5);
- ws.dispatchEvent(ev);
-}, null, {timeout:2000});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/008.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/008.html
deleted file mode 100644
index dd06f0d18..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/008.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<title>WebSockets: listening for events with onerror</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- var run = false;
- var foo = t.step_func(function (e) {
- run = true;
- assert_equals(e.detail, 5)
- });
- ws.onerror = foo;
- var ev = document.createEvent('UIEvents');
- ev.initUIEvent('error', false, false, window, 5);
- ws.dispatchEvent(ev);
- assert_true(run);
- t.done();
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/009.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/009.html
deleted file mode 100644
index dc25884ce..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/009.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<title>WebSockets: listening for events with onclose</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- var foo = t.step_func(function (e) {
- if (e.detail == 5)
- t.done();
- });
- ws.onclose = foo;
- var ev = document.createEvent('UIEvents');
- ev.initUIEvent('close', false, false, window, 5);
- ws.dispatchEvent(ev);
-}, null, {timeout:2000});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/010.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/010.html
deleted file mode 100644
index f4a4850d6..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/010.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting event handlers to undefined</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var events = ['onclose', 'onopen', 'onerror', 'onmessage'];
-for (var i = 0; i < events.length; ++i) {
- test(function(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/empty-message');
- var foo = function() {}
- ws[events[i]] = foo;
- assert_equals(ws[events[i]], foo, events[i]);
- ws[events[i]] = undefined;
- assert_equals(ws[events[i]], null, events[i]);
- });
-}
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/011.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/011.html
deleted file mode 100644
index 918becc10..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/011.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting event handlers to 1</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var events = ['onclose', 'onopen', 'onerror', 'onmessage'];
-for (var i = 0; i < events.length; ++i) {
- test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/empty-message');
- ws[events[i]] = 1;
- assert_equals(ws[events[i]], null);
- }, events[i]);
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/012.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/012.html
deleted file mode 100644
index 633f02c4a..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/012.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting event handlers to ";"</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var events = ['onclose', 'onopen', 'onerror', 'onmessage'];
-for (var i = 0; i < events.length; ++i) {
- test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/empty-message');
- ws[events[i]] = ";";
- assert_equals(ws[events[i]], null);
- }, events[i]);
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/013.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/013.html
deleted file mode 100644
index 465505128..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/013.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting event handlers to {handleEvent:function(){}}</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var events = ['onclose', 'onopen', 'onerror', 'onmessage'];
-for (var i = 0; i < events.length; ++i) {
- test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/empty-message');
- var obj = {handleEvent:this.unreached_func("handleEvent was called")};
- ws[events[i]] = obj;
- assert_equals(ws[events[i]], obj);
- ws.dispatchEvent(new Event(events[i].substr(2)));
- }, events[i]);
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/014.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/014.html
deleted file mode 100644
index 9250fb267..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/014.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting event handlers to null</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var events = ['onclose', 'onopen', 'onerror', 'onmessage'];
-for (var i = 0; i < events.length; ++i) {
- test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/empty-message');
- var foo = function() {}
- ws[events[i]] = foo;
- assert_equals(ws[events[i]], foo, events[i]);
- ws[events[i]] = null;
- assert_equals(ws[events[i]], null, events[i]);
- }, "Setting event handlers to null " + events[i]);
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/015.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/015.html
deleted file mode 100644
index 8852e6415..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/015.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html>
-<title>WebSockets: instanceof on events</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo_raw');
- ws.onopen = t.step_func(function(e) {
- assert_true(e instanceof Event);
- // first a text frame, then a frame with reserved opcode 3
- // which should fail the connection
- ws.send('\\x81\\x04test\\x83\\x03LOL');
- });
- ws.onmessage = t.step_func(function(e) {
- assert_true(e instanceof Event);
- assert_true(e instanceof MessageEvent);
- assert_equals(ws.readyState, ws.OPEN);
- })
- ws.onerror = t.step_func(function(e) {
- assert_true(e instanceof Event);
- assert_equals(ws.readyState, ws.CLOSED);
- })
- ws.onclose = t.step_func(function(e) {
- assert_true(e instanceof Event);
- assert_true(e instanceof CloseEvent);
- t.done();
- })
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/016.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/016.html
deleted file mode 100644
index 0e88c7903..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/016.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!doctype html>
-<title>WebSockets: addEventListener</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var count = 0;
- var checkCount = t.step_func(function (c, e) {
- count++;
- assert_equals(count, c);
- });
- // no spec requires this order for event listeners but the web does
- ws.addEventListener('open', t.step_func(function(e) {
- checkCount(1, e);
- ws.send('Goodbye');
- }), false);
- ws.onopen = t.step_func(function(e) {checkCount(2, e) });
- ws.addEventListener('open', t.step_func(function(e) {checkCount(3, e); }), false);
-
- ws.addEventListener('message', t.step_func(function(e) {checkCount(4, e); }), false);
- ws.onmessage = t.step_func(function(e) {checkCount(5, e) });
- ws.addEventListener('message', t.step_func(function(e) {checkCount(6, e); }), false);
-
- ws.addEventListener('close', t.step_func(function(e) {checkCount(7, e); }), false);
- ws.onclose = t.step_func(function(e) {checkCount(8, e) });
- ws.addEventListener('close', t.step_func(function(e) {
- checkCount(9, e);
- t.done();
- }), false);
-
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/017.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/017.html
deleted file mode 100644
index b2ed59367..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/017.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!doctype html>
-<title>WebSockets: this, e.target, e.currentTarget, e.eventPhase</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo_raw');
- ws.addEventListener('open', function(e) {
- var this_val = this;
- t.step(function() {
- // first a text frame, then a frame with reserved opcode 3
- // which should fail the connection
- ws.send('\\x81\\x04test\\x83\\x03LOL');
- assert_equals(this_val, ws);
- assert_equals(e.target, ws);
- assert_equals(e.currentTarget, ws);
- assert_equals(e.eventPhase, 2);
- });
- }, false);
- ws.addEventListener('message', function(e) {
- var this_val = this;
- t.step(function() {
- assert_equals(this_val, ws);
- assert_equals(e.target, ws);
- assert_equals(e.currentTarget, ws);
- assert_equals(e.eventPhase, 2);
- });
- }, false);
- ws.addEventListener('error', function(e) {
- var this_val = this;
- t.step(function() {
- assert_equals(this_val, ws);
- assert_equals(e.target, ws);
- assert_equals(e.currentTarget, ws);
- assert_equals(e.eventPhase, 2);
- });
- }, false);
- ws.addEventListener('close', function(e) {
- var this_val = this;
- t.step(function() {
- assert_equals(this_val, ws);
- assert_equals(e.target, ws);
- assert_equals(e.currentTarget, ws);
- assert_equals(e.eventPhase, 2);
- t.done();
- });
- }, false);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/018.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/018.html
deleted file mode 100644
index a3ef0f500..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/018.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!doctype html>
-<title>WebSockets: toString(), bubbles, cancelable</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var ws = null;
-setup(function() {
- ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo_raw');
-});
-
-async_test(function(t) {
- ws.addEventListener('open', t.step_func_done(function(e) {
- // first a text frame, then a frame with reserved opcode 3
- // which should fail the connection
- ws.send('\\x81\\x04test\\x83\\x03LOL');
- assert_equals(e.toString(), '[object Event]', "open e.toString()");
- assert_equals(e.bubbles, false, 'open e.bubbles');
- assert_equals(e.cancelable, false, 'open e.cancelable');
- }), false);
-}, "open event");
-
-async_test(function(t) {
- ws.addEventListener('message', t.step_func_done(function(e) {
- assert_equals(e.toString(), '[object MessageEvent]', "message e.toString()");
- assert_equals(e.bubbles, false, 'message e.bubbles');
- assert_equals(e.cancelable, false, 'message e.cancelable');
- }), false);
-}, "message event");
-
-async_test(function(t) {
- ws.addEventListener('error', t.step_func_done(function(e) {
- assert_equals(e.toString(), '[object Event]', "error e.toString()");
- assert_equals(e.bubbles, false, 'error e.bubbles');
- assert_equals(e.cancelable, false, 'error e.cancelable');
- }), false);
-}, "error event");
-
-async_test(function(t) {
- ws.addEventListener('close', t.step_func_done(function(e) {
- assert_equals(e.toString(), '[object CloseEvent]', "close e.toString()");
- assert_equals(e.bubbles, false, 'close e.bubbles');
- assert_equals(e.cancelable, false, 'close e.cancelable');
- }), false);
-}, "close event");
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/019.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/019.html
deleted file mode 100644
index f975a8098..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/019.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html>
-<title>WebSockets: removeEventListener</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-var events = ['open', 'message', 'error', 'close'];
-for (var i = 0; i < events.length; ++i) {
- test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.close();
- var got = [];
- var event;
- function addThis(e) {
- got.push(e.type);
- }
- ws.addEventListener(events[i], addThis, false);
- ws.removeEventListener(events[i], addThis, false);
- event = document.createEvent('Event');
- event.initEvent(events[i], false, false);
- ws.dispatchEvent(event);
- assert_equals(got.length, 0);
- if (got.length) {
- debug('Got: '+got);
- }
- })
-};
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/020.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/events/020.html
deleted file mode 100644
index 54d96fe63..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/events/020.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<title>WebSockets: error events</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket('ws://example.invalid/');
- ws.onerror = t.step_func(function(e) {
- assert_true(e instanceof Event);
- t.done();
- })
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/extensions/001.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/extensions/001.html
deleted file mode 100644
index f5003868e..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/extensions/001.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting extensions in connecting</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(t) {
- // The extensions attribute must initially return the empty string
- assert_equals((new WebSocket(SCHEME_DOMAIN_PORT+'/empty-message')).extensions, '');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/protocol/protocol-initial.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/protocol/protocol-initial.html
deleted file mode 100644
index ba27228ec..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/protocol/protocol-initial.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting protocol in connecting</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(t) {
- // The protocol attribute must initially return the empty string
- assert_equals((new WebSocket(SCHEME_DOMAIN_PORT + '/empty-message')).protocol, '');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/001.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/001.html
deleted file mode 100644
index aa5d9fdf1..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/001.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting readyState in connecting</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(t) {
- assert_equals((new WebSocket(SCHEME_DOMAIN_PORT+'/')).readyState, WebSocket.CONNECTING);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/002.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/002.html
deleted file mode 100644
index 9e97416f3..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/002.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting readyState</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- ws.readyState = 5;
- assert_equals(ws.readyState, ws.CONNECTING);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/003.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/003.html
deleted file mode 100644
index 93d72b64b..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/003.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<title>WebSockets: delete readyState</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- ws.close();
- delete ws.readyState;
- assert_equals(ws.readyState, ws.CLOSING, 'delete ws.readyState');
- delete WebSocket.prototype.readyState;
- assert_equals(ws.readyState, undefined, 'delete WebSocket.prototype.readyState');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/004.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/004.html
deleted file mode 100644
index fbe326a10..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/004.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<title>WebSockets: defineProperty getter for readyState</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- Object.defineProperty(WebSocket.prototype, 'readyState', {
- get: function() { return 'foo'; }
- });
- var ws = new WebSocket('ws://example.invalid/');
- assert_equals(ws.readyState, 'foo');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/005.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/005.html
deleted file mode 100644
index 3ca870529..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/005.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<title>WebSockets: defineProperty setter for readyState</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(){
- window.setter_ran = false;
- Object.defineProperty(WebSocket.prototype, 'readyState', {
- set: function(v) { window[v] = true; }
- });
- var ws = new WebSocket('ws://example.invalid/');
- ws.readyState = 'setter_ran';
- assert_true(setter_ran);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/006.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/006.html
deleted file mode 100644
index e0be938ab..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/006.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting readyState in open</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- assert_equals(ws.readyState, ws.OPEN);
- ws.close();
- t.done();
- });
- ws.onerror = ws.onmessage = ws.onclose = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/007.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/007.html
deleted file mode 100644
index 12a4cd087..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/007.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting readyState in closing</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.close();
- assert_equals(ws.readyState, ws.CLOSING);
- t.done();
- });
- ws.onerror = ws.onmessage = ws.onclose = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/008.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/008.html
deleted file mode 100644
index c83ead4e7..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/readyState/008.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting readyState in closed</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.onclose = t.step_func(function(e) {
- assert_equals(ws.readyState, ws.CLOSED);
- t.done();
- })
- ws.close();
- });
- ws.onerror = ws.onmessage = ws.onclose = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/001.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/001.html
deleted file mode 100644
index 3a22420ad..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/001.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<title>WebSockets: send() with no args</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_throws(new TypeError(), function(){ws.send()});
-});
-</script>
-
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/002.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/002.html
deleted file mode 100644
index f5c7e4feb..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/002.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<title>WebSockets: replacing send</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- ws.send = 5;
- assert_equals(ws.send, 5);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/003.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/003.html
deleted file mode 100644
index 08aadbf46..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/003.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<title>WebSockets: send() when readyState is CONNECTING</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_throws("INVALID_STATE_ERR", function(){ws.send('a')});
-});
-</script>
-
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/004.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/004.html
deleted file mode 100644
index af906b553..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/004.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<title>WebSockets: send() with unpaired surrogate when readyState is CONNECTING</title>
-
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_throws("INVALID_STATE_ERR", function(){ws.send('a\uDC00x')});
-}, "lone low surrogate");
-
-test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_throws("INVALID_STATE_ERR", function(){ws.send('a\uD800x')});
-}, "lone high surrogate");
-
-test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_throws("INVALID_STATE_ERR", function(){ws.send('a\uDC00\uD800x')});
-}, "surrogates in wrong order");
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/005.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/005.html
deleted file mode 100644
index 69e727d11..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/005.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html>
-<title>WebSockets: send() return value</title>
-
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- assert_equals(ws.send('test'), undefined);
- t.done();
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/006.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/006.html
deleted file mode 100644
index ce871a106..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/006.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<title>WebSockets: send() with unpaired surrogate when readyState is OPEN</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id="log"></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- // lone low surrogate, lone high surrogate + surrogates in wrong order.
- ws.send('a\uDC00xb\uD800xc\uDC00\uD800x');
- })
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, 'a\uFFFDxb\uFFFDxc\uFFFD\uFFFDx');
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(function() {t.done();}, 50);
- });
- ws.close();
- })
- });
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/007.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/007.html
deleted file mode 100644
index 73dd08930..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/007.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<title>WebSockets: close() followed by send()</title>
-
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- // test that nothing strange happens if we send something after close()
- ws.close();
- var sent = ws.send('test');
- assert_equals(sent, undefined);
- });
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(function() {t.done()}, 50);
- });
- ws.onerror = ws.onmessage = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/008.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/008.html
deleted file mode 100644
index c5fc34bd8..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/008.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<title>WebSockets: send() in onclose</title>
-
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.send('Goodbye');
- })
- ws.onclose = t.step_func(function(e) {
- // test that nothing strange happens when send()ing in closed state
- var sent = ws.send('test');
- assert_equals(sent, undefined);
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(function() {t.done()}, 50);
- })
- ws.onerror = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/009.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/009.html
deleted file mode 100644
index 8f9417e77..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/009.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<title>WebSockets: send('')</title>
-
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/empty-message');
- ws.onopen = t.step_func(function(e) {
- ws.send('');
- })
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, 'pass');
- ws.close();
- });
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(function() {t.done()}, 50);
- });
- ws.onerror = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/010.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/010.html
deleted file mode 100644
index f6680c66f..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/010.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!doctype html>
-<title>WebSockets: sending non-strings</title>
-
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(outer) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- var stuffToSend = [null, undefined, 1, window, document.body, {}, [], ws, function(){}, new Error()]
- var tests = [];
-
- for (var i=0; i<stuffToSend.length; i++) {
- tests.push(async_test(document.title + " (" + stuffToSend[i] + ")"));
- }
-
- i = 0;
- function sendNext() {
- if (i === stuffToSend.length) {
- outer.done()
- ws.close();
- } else {
- var t = tests[i];
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, String(stuffToSend[i]));
- i++;
- sendNext();
- t.done();
- });
- ws.onclose = ws.onerror = t.step_func(function() {assert_unreached()});
- ws.send(stuffToSend[i]);
- }
- }
- ws.onopen = outer.step_func(function(e) {
- sendNext();
- });
-}, "Constructor succeeds");
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/011.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/011.html
deleted file mode 100644
index c00fa7f33..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/011.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<title>WebSockets: sending non-ascii, combining chars and non-BMP</title>
-
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.send('\u00E5 a\u030A \uD801\uDC7E');
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, '\u00E5 a\u030A \uD801\uDC7E');
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(function() {t.done()}, 50);
- })
- ws.close();
- })
- ws.onclose = ws.onerror = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/012.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/send/012.html
deleted file mode 100644
index af5b935c6..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/send/012.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!doctype html>
-<title>WebSockets: sending null</title>
-
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-
-async_test(function(t){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.send(null);
- });
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, 'null');
- ws.onclose = t.step_func(function(e) {
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(function() {t.done()}, 50);
- })
- ws.close();
- });
- ws.onclose = ws.onerror = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/001.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/001.html
deleted file mode 100644
index 3d1e5e5b8..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/001.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html>
-<title>WebSockets: getting url</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- assert_equals((new WebSocket(SCHEME_DOMAIN_PORT)).url, SCHEME_DOMAIN_PORT+'/');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/002.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/002.html
deleted file mode 100644
index aa1166402..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/002.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!doctype html>
-<title>WebSockets: setting url</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- ws.url = SCHEME_DOMAIN_PORT+'/test';
- assert_equals(ws.url, SCHEME_DOMAIN_PORT+'/');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/003.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/003.html
deleted file mode 100644
index 8cc0b7919..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/003.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<title>WebSockets: deleting url</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- delete ws.url;
- assert_equals(ws.url, SCHEME_DOMAIN_PORT+'/', 'delete ws.url');
- delete WebSocket.prototype.url;
- assert_equals(ws.url, undefined, 'delete WebSocket.prototype.url');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/004.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/004.html
deleted file mode 100644
index 908e2cd9e..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/004.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<title>WebSockets: 'URL'</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/');
- assert_equals(ws.URL, undefined);
- assert_equals('URL' in ws, false);
- assert_equals(WebSocket.prototype.URL, undefined);
- assert_equals('URL' in WebSocket.prototype, false);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/005.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/005.html
deleted file mode 100644
index f3d89cf2e..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/005.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!doctype html>
-<title>WebSockets: defineProperty getter for url</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- Object.defineProperty(WebSocket.prototype, 'url', {
- get: function() { return 'foo'; }
- });
- var ws = new WebSocket('ws://example.invalid/');
- assert_equals(ws.url, 'foo');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/006.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/006.html
deleted file mode 100644
index 124bdbc19..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/006.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<title>WebSockets: defineProperty setter for url</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- window.setter_ran = false;
- Object.defineProperty(WebSocket.prototype, 'url', {
- set: function(v) { window[v] = true; }
- });
- var ws = new WebSocket('ws://example.invalid/');
- ws.url = 'setter_ran';
- assert_true(setter_ran);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/resolve.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/resolve.html
deleted file mode 100644
index ad7db147f..000000000
--- a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/resolve.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<title>WebSocket#url: resolving</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../../../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-test(function() {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT + '/echo?foo%20bar baz');
- assert_equals(ws.url, SCHEME_DOMAIN_PORT + '/echo?foo%20bar%20baz');
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/keeping-connection-open/001.html b/testing/web-platform/tests/websockets/keeping-connection-open/001.html
deleted file mode 100644
index ec18fe67e..000000000
--- a/testing/web-platform/tests/websockets/keeping-connection-open/001.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<title>WebSockets: 20s inactivity after handshake</title>
-<meta name=timeout content=long>
-<p>Note: This test takes 20 seconds to run.</p>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onclose = ws.onerror = ws.onmessage = t.step_func(function() {assert_unreached()});
- ws.onopen = t.step_func(function(e) {
- setTimeout(t.step_func(function() {
- ws.send('test');
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, 'test');
- ws.onclose = t.step_func(function(e) {
- setTimeout(t.step_func(function() {t.done();}), 50)
- });
- ws.close();
- });
- }), 20000);
- })
-}, null, {timeout:30000});
-</script>
diff --git a/testing/web-platform/tests/websockets/opening-handshake/001.html b/testing/web-platform/tests/websockets/opening-handshake/001.html
deleted file mode 100644
index 9683a3595..000000000
--- a/testing/web-platform/tests/websockets/opening-handshake/001.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html>
-<title>WebSockets: invalid handshake</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/invalid');
- ws.onclose = t.step_func(function(e) {
- assert_false(e.wasClean);
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done();}), 50)
- });
- ws.onmessage = ws.onopen = t.step_func(function() {assert_unreached()});
-}, null, {timeout:9900});
-</script>
diff --git a/testing/web-platform/tests/websockets/opening-handshake/002.html b/testing/web-platform/tests/websockets/opening-handshake/002.html
deleted file mode 100644
index d18ec6e43..000000000
--- a/testing/web-platform/tests/websockets/opening-handshake/002.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<title>WebSockets: valid handshake</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- ws.onclose = t.step_func(function(e) {
- assert_equals(e.wasClean, true);
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done();}), 50)
- })
- ws.close();
- });
- ws.onerror = ws.onmessage = ws.onclose = t.step_func(function() {assert_unreached()});
-}, null, {timeout:9900});
-</script>
diff --git a/testing/web-platform/tests/websockets/opening-handshake/003-sets-origin.worker.js b/testing/web-platform/tests/websockets/opening-handshake/003-sets-origin.worker.js
deleted file mode 100644
index 85954ca2b..000000000
--- a/testing/web-platform/tests/websockets/opening-handshake/003-sets-origin.worker.js
+++ /dev/null
@@ -1,19 +0,0 @@
-importScripts("/resources/testharness.js");
-importScripts('../constants.js?pipe=sub');
-importScripts('../websocket.sub.js');
-
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/origin');
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, location.protocol+'//'+location.host);
- ws.onclose = t.step_func(function(e) {
- assert_equals(e.wasClean, true);
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func_done(), 50)
- })
- ws.close();
- })
- ws.onerror = ws.onclose = t.step_func(function() {assert_unreached()});
-}, "W3C WebSocket API - origin set in a Worker");
-
-done();
diff --git a/testing/web-platform/tests/websockets/opening-handshake/003.html b/testing/web-platform/tests/websockets/opening-handshake/003.html
deleted file mode 100644
index 6c634b0e9..000000000
--- a/testing/web-platform/tests/websockets/opening-handshake/003.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html>
-<title>WebSockets: origin</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/origin');
- ws.onmessage = t.step_func(function(e) {
- assert_equals(e.data, location.protocol+'//'+location.host);
- ws.onclose = t.step_func(function(e) {
- assert_equals(e.wasClean, true);
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done();}), 50)
- })
- ws.close();
- })
- ws.onerror = ws.onclose = t.step_func(function() {assert_unreached()});
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/opening-handshake/005.html b/testing/web-platform/tests/websockets/opening-handshake/005.html
deleted file mode 100644
index 3a1a964c2..000000000
--- a/testing/web-platform/tests/websockets/opening-handshake/005.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<title>WebSockets: proper first line</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/simple_handshake');
- ws.onmessage = t.step_func(function() {assert_unreached()});
- ws.onopen = t.step_func(function(e) {
- ws.onclose = t.step_func(function(e) {
- assert_equals(e.wasClean, true);
- ws.onclose = t.step_func(function() {assert_unreached()});
- setTimeout(t.step_func(function() {t.done();}), 50)
- })
- ws.close();
- })
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/security/001.html b/testing/web-platform/tests/websockets/security/001.html
deleted file mode 100644
index 4cc24598b..000000000
--- a/testing/web-platform/tests/websockets/security/001.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<title>WebSockets: wrong accept key</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/wrong_accept_key');
- ws.onclose = t.step_func(function(e) {
- t.done();
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/security/002.html b/testing/web-platform/tests/websockets/security/002.html
deleted file mode 100644
index 2bdc133ec..000000000
--- a/testing/web-platform/tests/websockets/security/002.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: check Sec-WebSocket-Key</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<script>
-async_test(function(t) {
- var xhr = new XMLHttpRequest();
- xhr.onload = t.step_func(function() {
- assert_equals(xhr.responseText, 'PASS');
- t.done();
- });
- xhr.open("GET", "check.py", true);
- xhr.setRequestHeader('Sec-WebSocket-Key', 'jW7qmdXj5Kk5jTClF1BN3');
- xhr.send(null);
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/security/check.py b/testing/web-platform/tests/websockets/security/check.py
deleted file mode 100644
index f1414376d..000000000
--- a/testing/web-platform/tests/websockets/security/check.py
+++ /dev/null
@@ -1,2 +0,0 @@
-def main(request, response):
- return "FAIL" if 'Sec-WebSocket-Key' in request.headers else "PASS"
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-1.html b/testing/web-platform/tests/websockets/unload-a-document/001-1.html
deleted file mode 100644
index 926a68a06..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/001-1.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating top-level browsing context</title>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<script>
-var controller = opener || parent;
-var t = controller.t;
-var assert_equals = controller.asset_equals;
-var assert_unreached = controller.assert_unreached;
-var uuid = controller.uuid;
-t.add_cleanup(function() {delete sessionStorage[uuid];});
-t.step(function() {
- if (sessionStorage[uuid]) {
- t.done();
- } else {
- sessionStorage[uuid] = 'true';
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- setTimeout(t.step_func(function() {
- assert_unreached('document was not discarded');
- }), 1000);
- controller.navigate();
- })
- ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type));
- }
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001-2.html b/testing/web-platform/tests/websockets/unload-a-document/001-2.html
deleted file mode 100644
index 24c419ce1..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/001-2.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating top-level browsing context</title>
-<body onload="history.back()"></body>
-</html>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/001.html b/testing/web-platform/tests/websockets/unload-a-document/001.html
deleted file mode 100644
index 56e883c64..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/001.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating top-level browsing context</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/common/utils.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<p>Test requires popup blocker disabled</p>
-<div id=log></div>
-<script>
-var t = async_test();
-var w;
-var uuid;
-t.step(function() {
- uuid = token()
- w = window.open("001-1.html");
- add_result_callback(function() {
- w.close();
- });
-});
-navigate = t.step_func(function() {
- w.location = w.location.href.replace("001-1.html", "001-2.html");
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-1.html b/testing/web-platform/tests/websockets/unload-a-document/002-1.html
deleted file mode 100644
index 52f188fa4..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/002-1.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating top-level browsing context with closed websocket</title>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<script>
-var controller = opener || parent;
-var t = controller.t;
-var assert_equals = controller.asset_equals;
-var assert_unreached = controller.assert_unreached ;
-var uuid = controller.token;
-t.add_cleanup(function() {delete sessionStorage[uuid];});
-t.step(function() {
- // this test can fail if the document is unloaded on navigation e.g. due to OOM
- if (sessionStorage[uuid]) {
- assert_unreached('document was discarded');
- } else {
- sessionStorage[uuid] = 'true';
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
-
- setTimeout(t.step_func(function() {
- assert_equals(ws.readyState, ws.CLOSED, 'ws.readyState');
- t.done();
- }), 4000);
- ws.close();
- ws.onclose = t.step_func(function() {
- controller.navigate();
- });
- })
- ws.onerror = ws.onmessage = t.step_func(e => assert_unreached("Got unexpected event " + e.type));
- }
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002-2.html b/testing/web-platform/tests/websockets/unload-a-document/002-2.html
deleted file mode 100644
index 9a246a1dd..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/002-2.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating top-level browsing context with closed websocket</title>
-<body onload="history.back()"></body>
-</html>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/002.html b/testing/web-platform/tests/websockets/unload-a-document/002.html
deleted file mode 100644
index 03764c345..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/002.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating top-level browsing context with closed websocket</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/common/utils.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<p>Test requires popup blocker disabled</p>
-<div id=log></div>
-<script>
-var t = async_test(null, {timeout:15000});
-var w;
-var uuid;
-t.step(function() {
- uuid = token()
- w = window.open("002-1.html");
- add_result_callback(function() {
- w.close();
- });
-});
-navigate = t.step_func(function() {
- w.location = w.location.href.replace("002-1.html", "002-2.html");
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/003.html b/testing/web-platform/tests/websockets/unload-a-document/003.html
deleted file mode 100644
index 554daf458..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/003.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating nested browsing context</title>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/common/utils.js></script>
-<div id=log></div>
-<script>
-var uuid;
-var t = async_test(function() {uuid = token()});
-var navigate = t.step_func(function() {
- document.getElementsByTagName("iframe")[0].src = 'data:text/html,<body onload="history.back()">';
-});
-</script>
-<iframe src=001-1.html></iframe> \ No newline at end of file
diff --git a/testing/web-platform/tests/websockets/unload-a-document/004.html b/testing/web-platform/tests/websockets/unload-a-document/004.html
deleted file mode 100644
index 0ef4fbc9f..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/004.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating nested browsing context with closed websocket</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=/common/utils.js></script>
-<div id=log></div>
-<script>
-var uuid;
-var t = async_test(null, {timeout:15000})
-t.step(function() {uuid = token()});
-var navigate = t.step_func(function() {
- document.getElementsByTagName("iframe")[0].src = 'data:text/html,<body onload="history.back()">';
-});
-</script>
-<iframe src=002-1.html></iframe>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/005-1.html b/testing/web-platform/tests/websockets/unload-a-document/005-1.html
deleted file mode 100644
index 04a14874a..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/005-1.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating nested browsing context with a websocket in top-level</title>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<script>
-var t = opener.t;
-var assert_unreached = opener.assert_unreached;
-var hasRun = false;
-function run(){
- var ws = new WebSocket(SCHEME_DOMAIN_PORT+'/echo');
- ws.onopen = t.step_func(function(e) {
- setTimeout(t.step_func(function() {
- ws.send('test');
- }), 1000);
- window[0].location = 'data:text/html,<body onload="history.back()">';
- ws.onmessage = t.step_func(function(e) {
- ws.close();
- t.done();
- });
- });
- ws.onerror = ws.onmessage = ws.onclose = t.step_func(function(e) {assert_unreached("Got unexpected event " + e.type)});
-}
-</script>
-<iframe src='data:text/html,foo' onload='if (hasRun) return; hasRun = true; t.step(run)'></iframe>
diff --git a/testing/web-platform/tests/websockets/unload-a-document/005.html b/testing/web-platform/tests/websockets/unload-a-document/005.html
deleted file mode 100644
index 4bafe8b60..000000000
--- a/testing/web-platform/tests/websockets/unload-a-document/005.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<title>WebSockets: navigating nested browsing context with a websocket in top-level</title>
-<meta name=timeout content=long>
-<script src=/resources/testharness.js></script>
-<script src=/resources/testharnessreport.js></script>
-<script src=../constants.js?pipe=sub></script>
-<meta name="variant" content="">
-<meta name="variant" content="?wss">
-<div id=log></div>
-<p>Test requires popup blocker disabled</p>
-<div id=log></div>
-<script>
-var t = async_test(null, {timeout:15000});
-t.step(function() {
- var w = window.open("005-1.html");
- add_result_callback(function() {
- w.close();
- });
-});
-</script>
diff --git a/testing/web-platform/tests/websockets/websocket.sub.js b/testing/web-platform/tests/websockets/websocket.sub.js
deleted file mode 100644
index 65c4c3036..000000000
--- a/testing/web-platform/tests/websockets/websocket.sub.js
+++ /dev/null
@@ -1,107 +0,0 @@
-var __SERVER__NAME = "{{host}}";
-var __PORT = {{ports[ws][0]}};
-var __SECURE__PORT = {{ports[wss][0]}};
-var __NEW__PORT = __PORT; //All ports are non-default for now
-var __NEW__SECURE__PORT = __SECURE__PORT; //All ports are non-default for now
-var __PATH = "echo";
-var wsocket;
-var data;
-
-function IsWebSocket() {
- if (!self.WebSocket) {
- assert_true(false, "Browser does not support WebSocket");
- }
-}
-
-function CreateWebSocketNonAbsolute() {
- IsWebSocket();
- var url = __SERVER__NAME;
- wsocket = new WebSocket(url);
-}
-
-function CreateWebSocketNonWsScheme() {
- IsWebSocket();
- var url = "http://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH;
- wsocket = new WebSocket(url);
-}
-
-function CreateWebSocketNonAsciiProtocol(nonAsciiProtocol) {
- IsWebSocket();
- var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH;
- wsocket = new WebSocket(url, nonAsciiProtocol);
-}
-
-function CreateWebSocketWithAsciiSep(asciiWithSep) {
- IsWebSocket();
- var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH;
- wsocket = new WebSocket(url, asciiWithSep);
-}
-
-function CreateWebSocketWithBlockedPort(blockedPort) {
- IsWebSocket();
- var url = "wss://" + __SERVER__NAME + ":" + blockedPort + "/" + __PATH;
- wsocket = new WebSocket(url);
-}
-
-function CreateWebSocketWithSpaceInUrl(urlWithSpace) {
- IsWebSocket();
- var url = "ws://" + urlWithSpace + ":" + __PORT + "/" + __PATH;
- wsocket = new WebSocket(url);
-}
-
-function CreateWebSocketWithSpaceInProtocol(protocolWithSpace) {
- IsWebSocket();
- var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH;
- wsocket = new WebSocket(url, protocolWithSpace);
-}
-
-function CreateWebSocketWithRepeatedProtocols() {
- IsWebSocket();
- var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH;
- wsocket = new WebSocket(url, ["echo", "echo"]);
-}
-
-function CreateWebSocketWithRepeatedProtocolsCaseInsensitive() {
- IsWebSocket();
- var url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH;
- wsocket = new WebSocket(url, ["echo", "eCho"]);
-}
-
-function CreateWebSocket(isSecure, isProtocol, isProtocols) {
- IsWebSocket();
- var url;
- if (isSecure) {
- if (__SECURE__PORT === null) {
- throw new Error("wss not yet supported");
- }
- url = "wss://" + __SERVER__NAME + ":" + __SECURE__PORT + "/" + __PATH;
- }
- else {
- url = "ws://" + __SERVER__NAME + ":" + __PORT + "/" + __PATH;
- }
-
- if (isProtocol) {
- wsocket = new WebSocket(url, "echo");
- }
- else if (isProtocols) {
- wsocket = new WebSocket(url, ["echo", "chat"]);
- }
- else {
- wsocket = new WebSocket(url);
- }
- return wsocket;
-}
-
-function CreateControlWebSocket(isSecure) {
- IsWebSocket();
- var url;
- if (isSecure) {
- url = "wss://" + __SERVER__NAME + ":" + __SECURE__PORT + "/control";
- }
- else {
- url = "ws://" + __SERVER__NAME + ":" + __PORT + "/control";
- }
-
- return new WebSocket(url);
-}
-