summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/baseurl/gamma
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/workers/baseurl/gamma
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/workers/baseurl/gamma')
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/import.js2
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/importScripts.js6
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/script-module.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-worker.js8
-rw-r--r--testing/web-platform/tests/workers/baseurl/gamma/xhr.js4
11 files changed, 35 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/import.js b/testing/web-platform/tests/workers/baseurl/gamma/import.js
new file mode 100644
index 0000000000..1246913a84
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/import.js
@@ -0,0 +1,2 @@
+import r from "./script-module.js";
+postMessage(r);
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 0000000000..13820380a8
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/importScripts.js
@@ -0,0 +1,6 @@
+importScripts('/resources/testharness.js');
+importScripts("script.js");
+test(() => {
+ assert_equals(result, "gamma/script.js");
+});
+done();
diff --git a/testing/web-platform/tests/workers/baseurl/gamma/script-module.js b/testing/web-platform/tests/workers/baseurl/gamma/script-module.js
new file mode 100644
index 0000000000..88d5f82db3
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/script-module.js
@@ -0,0 +1 @@
+export default 'gamma/script-module.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 0000000000..0f9ce8eacf
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/script.js
@@ -0,0 +1 @@
+var result = 'gamma/script.js';
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 0000000000..d0718cfdef
--- /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 0000000000..e23602ff9c
--- /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 0000000000..44407358e6
--- /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 0000000000..af17f6cc87
--- /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 0000000000..8cfbcaef31
--- /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-worker.js b/testing/web-platform/tests/workers/baseurl/gamma/xhr-worker.js
new file mode 100644
index 0000000000..a9d77827d9
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/gamma/xhr-worker.js
@@ -0,0 +1,8 @@
+importScripts('/resources/testharness.js');
+test(t => {
+ var x = new XMLHttpRequest();
+ x.open("GET", "test.txt", false);
+ x.send();
+ assert_equals(x.response, "gamma\n");
+});
+done();
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 0000000000..70f331565a
--- /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);