summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets/interfaces
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-02-25 01:03:57 +0000
committerMoonchild <moonchild@palemoon.org>2021-02-25 01:03:57 +0000
commitceadffab6b357723981a429e11222daf6cd6dcfb (patch)
tree5603053048d6a460f79b22bdf165fb74d32d39b0 /testing/web-platform/tests/websockets/interfaces
parent14fb2f966e9b54598c451e3cb35b4aa0480dafed (diff)
parentad5a13bd501e379517da1a944c104a11d951a3f5 (diff)
downloadUXP-RC_20210225.tar
UXP-RC_20210225.tar.gz
UXP-RC_20210225.tar.lz
UXP-RC_20210225.tar.xz
UXP-RC_20210225.zip
Merge branch 'master' into releaseRC_20210225
Diffstat (limited to 'testing/web-platform/tests/websockets/interfaces')
-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
73 files changed, 0 insertions, 1617 deletions
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>