summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/baseurl
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/workers/baseurl
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/workers/baseurl')
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/importScripts.html14
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/sharedworker.html14
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/worker.html14
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/xhr.html14
-rw-r--r--testing/web-platform/tests/workers/baseurl/beta/importScripts.py3
-rw-r--r--testing/web-platform/tests/workers/baseurl/beta/script.js1
-rw-r--r--testing/web-platform/tests/workers/baseurl/beta/sharedworker.py3
-rw-r--r--testing/web-platform/tests/workers/baseurl/beta/subsharedworker.js3
-rw-r--r--testing/web-platform/tests/workers/baseurl/beta/subworker.js1
-rw-r--r--testing/web-platform/tests/workers/baseurl/beta/test.txt1
-rw-r--r--testing/web-platform/tests/workers/baseurl/beta/worker.py3
-rw-r--r--testing/web-platform/tests/workers/baseurl/beta/xhr.py3
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/importScripts.js1
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/script.js1
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/sharedworker.js4
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/subsharedworker.js3
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/subworker.js1
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/test.txt1
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/worker.js4
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/xhr.js4
20 files changed, 93 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/importScripts.html b/testing/web-platform/tests/workers/baseurl/alpha/importScripts.html
new file mode 100644
index 000000000..0fbd35b44
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/importScripts.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in workers: importScripts</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+async_test(function() {
+ var worker = new Worker("../beta/importScripts.py");
+ worker.onmessage = this.step_func_done(function(e) {
+ assert_equals(e.data, "gamma");
+ });
+ worker.onerror = this.unreached_func("Got error event");
+});
+</script>
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/sharedworker.html b/testing/web-platform/tests/workers/baseurl/alpha/sharedworker.html
new file mode 100644
index 000000000..25d258236
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/sharedworker.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in workers: new SharedWorker()</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+async_test(function() {
+ var worker = new Worker("../beta/sharedworker.py");
+ worker.onmessage = this.step_func_done(function(e) {
+ assert_equals(e.data, "gamma");
+ });
+ worker.onerror = this.unreached_func("Got error event");
+});
+</script>
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/worker.html b/testing/web-platform/tests/workers/baseurl/alpha/worker.html
new file mode 100644
index 000000000..284425ed3
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/worker.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in workers: new Worker()</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+async_test(function() {
+ var worker = new Worker("../beta/worker.py");
+ worker.onmessage = this.step_func_done(function(e) {
+ assert_equals(e.data, "gamma");
+ });
+ worker.onerror = this.unreached_func("Got error event");
+});
+</script>
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/xhr.html b/testing/web-platform/tests/workers/baseurl/alpha/xhr.html
new file mode 100644
index 000000000..9a1219b45
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/xhr.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in workers: XHR</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+async_test(function() {
+ var worker = new Worker("../beta/xhr.py");
+ worker.onmessage = this.step_func_done(function(e) {
+ assert_equals(e.data, "gamma\n");
+ });
+ worker.onerror = this.unreached_func("Got error event");
+});
+</script>
diff --git a/testing/web-platform/tests/workers/baseurl/beta/importScripts.py b/testing/web-platform/tests/workers/baseurl/beta/importScripts.py
new file mode 100644
index 000000000..75dac194f
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/beta/importScripts.py
@@ -0,0 +1,3 @@
+def main(request, response):
+ return (302, "Moved"), [("Location", "../gamma/importScripts.js")], "postMessage('executed redirecting script');"
+
diff --git a/testing/web-platform/tests/workers/baseurl/beta/script.js b/testing/web-platform/tests/workers/baseurl/beta/script.js
new file mode 100644
index 000000000..8fe3dfc13
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/beta/script.js
@@ -0,0 +1 @@
+postMessage('beta');
diff --git a/testing/web-platform/tests/workers/baseurl/beta/sharedworker.py b/testing/web-platform/tests/workers/baseurl/beta/sharedworker.py
new file mode 100644
index 000000000..875cc9a04
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/beta/sharedworker.py
@@ -0,0 +1,3 @@
+def main(request, response):
+ return (302, "Moved"), [("Location", "../gamma/sharedworker.js")], "postMessage('executed redirecting script');"
+
diff --git a/testing/web-platform/tests/workers/baseurl/beta/subsharedworker.js b/testing/web-platform/tests/workers/baseurl/beta/subsharedworker.js
new file mode 100644
index 000000000..de6a8caca
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/beta/subsharedworker.js
@@ -0,0 +1,3 @@
+onconnect = function(e) {
+ e.source.postMessage('beta');
+}
diff --git a/testing/web-platform/tests/workers/baseurl/beta/subworker.js b/testing/web-platform/tests/workers/baseurl/beta/subworker.js
new file mode 100644
index 000000000..997cecd6c
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/beta/subworker.js
@@ -0,0 +1 @@
+postMessage("beta");
diff --git a/testing/web-platform/tests/workers/baseurl/beta/test.txt b/testing/web-platform/tests/workers/baseurl/beta/test.txt
new file mode 100644
index 000000000..65b2df87f
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/beta/test.txt
@@ -0,0 +1 @@
+beta
diff --git a/testing/web-platform/tests/workers/baseurl/beta/worker.py b/testing/web-platform/tests/workers/baseurl/beta/worker.py
new file mode 100644
index 000000000..44baf5203
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/beta/worker.py
@@ -0,0 +1,3 @@
+def main(request, response):
+ return (302, "Moved"), [("Location", "../gamma/worker.js")], "postMessage('executed redirecting script');"
+
diff --git a/testing/web-platform/tests/workers/baseurl/beta/xhr.py b/testing/web-platform/tests/workers/baseurl/beta/xhr.py
new file mode 100644
index 000000000..de3f04ed0
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/beta/xhr.py
@@ -0,0 +1,3 @@
+def main(request, response):
+ return (302, "Moved"), [("Location", "../gamma/xhr.js")], "postMessage('executed redirecting script');"
+
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/importScripts.js b/testing/web-platform/tests/workers/baseurl/gamma/importScripts.js
new file mode 100644
index 000000000..3f7685645
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/importScripts.js
@@ -0,0 +1 @@
+importScripts("script.js");
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/script.js b/testing/web-platform/tests/workers/baseurl/gamma/script.js
new file mode 100644
index 000000000..dddf2240c
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/script.js
@@ -0,0 +1 @@
+postMessage('gamma');
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/sharedworker.js b/testing/web-platform/tests/workers/baseurl/gamma/sharedworker.js
new file mode 100644
index 000000000..d0718cfde
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/sharedworker.js
@@ -0,0 +1,4 @@
+var worker = new SharedWorker("subsharedworker.js");
+worker.port.onmessage = function(e) {
+ postMessage(e.data);
+}
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/subsharedworker.js b/testing/web-platform/tests/workers/baseurl/gamma/subsharedworker.js
new file mode 100644
index 000000000..e23602ff9
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/subsharedworker.js
@@ -0,0 +1,3 @@
+onconnect = function(e) {
+ e.source.postMessage('gamma');
+}
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/subworker.js b/testing/web-platform/tests/workers/baseurl/gamma/subworker.js
new file mode 100644
index 000000000..44407358e
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/subworker.js
@@ -0,0 +1 @@
+postMessage("gamma");
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/test.txt b/testing/web-platform/tests/workers/baseurl/gamma/test.txt
new file mode 100644
index 000000000..af17f6cc8
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/test.txt
@@ -0,0 +1 @@
+gamma
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/worker.js b/testing/web-platform/tests/workers/baseurl/gamma/worker.js
new file mode 100644
index 000000000..8cfbcaef3
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/worker.js
@@ -0,0 +1,4 @@
+var worker = new Worker("subworker.js");
+worker.onmessage = function(e) {
+ postMessage(e.data);
+}
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/xhr.js b/testing/web-platform/tests/workers/baseurl/gamma/xhr.js
new file mode 100644
index 000000000..70f331565
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/xhr.js
@@ -0,0 +1,4 @@
+var x = new XMLHttpRequest();
+x.open("GET", "test.txt", false);
+x.send();
+postMessage(x.response);