summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/websockets/interfaces/WebSocket/url
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/websockets/interfaces/WebSocket/url
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/websockets/interfaces/WebSocket/url')
-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
7 files changed, 112 insertions, 0 deletions
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/url/001.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/001.html
new file mode 100644
index 000000000..3d1e5e5b8
--- /dev/null
+++ b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/001.html
@@ -0,0 +1,13 @@
+<!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
new file mode 100644
index 000000000..aa1166402
--- /dev/null
+++ b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/002.html
@@ -0,0 +1,15 @@
+<!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
new file mode 100644
index 000000000..8cc0b7919
--- /dev/null
+++ b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/003.html
@@ -0,0 +1,17 @@
+<!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
new file mode 100644
index 000000000..908e2cd9e
--- /dev/null
+++ b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/004.html
@@ -0,0 +1,17 @@
+<!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
new file mode 100644
index 000000000..f3d89cf2e
--- /dev/null
+++ b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/005.html
@@ -0,0 +1,17 @@
+<!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
new file mode 100644
index 000000000..124bdbc19
--- /dev/null
+++ b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/006.html
@@ -0,0 +1,19 @@
+<!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
new file mode 100644
index 000000000..ad7db147f
--- /dev/null
+++ b/testing/web-platform/tests/websockets/interfaces/WebSocket/url/resolve.html
@@ -0,0 +1,14 @@
+<!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>