summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/baseurl/alpha
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/workers/baseurl/alpha
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/workers/baseurl/alpha')
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/import-in-moduleworker.html14
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/importScripts-in-sharedworker.html8
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/importScripts-in-worker.html8
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/sharedworker-in-worker.html14
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/worker-in-worker.html14
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/xhr-in-moduleworker.html14
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/xhr-in-sharedworker.html8
-rw-r--r--testing/web-platform/tests/workers/baseurl/alpha/xhr-in-worker.html8
8 files changed, 88 insertions, 0 deletions
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/import-in-moduleworker.html b/testing/web-platform/tests/workers/baseurl/alpha/import-in-moduleworker.html
new file mode 100644
index 0000000000..2c75dec9ce
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/import-in-moduleworker.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in module dedicated workers: import</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+async_test(function() {
+ var worker = new Worker("../beta/import.py", {type: "module"});
+ worker.onmessage = this.step_func_done(function(e) {
+ assert_equals(e.data, "gamma/script-module.js");
+ });
+ worker.onerror = this.unreached_func("Got error event");
+});
+</script>
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/importScripts-in-sharedworker.html b/testing/web-platform/tests/workers/baseurl/alpha/importScripts-in-sharedworker.html
new file mode 100644
index 0000000000..6a4111c6c0
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/importScripts-in-sharedworker.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in classic shared workers: importScripts</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new SharedWorker("../beta/importScripts.py"));
+</script>
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/importScripts-in-worker.html b/testing/web-platform/tests/workers/baseurl/alpha/importScripts-in-worker.html
new file mode 100644
index 0000000000..55907bf423
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/importScripts-in-worker.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in classic dedicated workers: importScripts</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new Worker("../beta/importScripts.py"));
+</script>
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/sharedworker-in-worker.html b/testing/web-platform/tests/workers/baseurl/alpha/sharedworker-in-worker.html
new file mode 100644
index 0000000000..25d2582366
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/sharedworker-in-worker.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-in-worker.html b/testing/web-platform/tests/workers/baseurl/alpha/worker-in-worker.html
new file mode 100644
index 0000000000..284425ed34
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/worker-in-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-in-moduleworker.html b/testing/web-platform/tests/workers/baseurl/alpha/xhr-in-moduleworker.html
new file mode 100644
index 0000000000..7597a1357d
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/xhr-in-moduleworker.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in module dedicated 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", {type: "module"});
+ 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/alpha/xhr-in-sharedworker.html b/testing/web-platform/tests/workers/baseurl/alpha/xhr-in-sharedworker.html
new file mode 100644
index 0000000000..43921b898d
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/xhr-in-sharedworker.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in classic shared workers: XHR</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new SharedWorker("../beta/xhr-worker.py"));
+</script>
diff --git a/testing/web-platform/tests/workers/baseurl/alpha/xhr-in-worker.html b/testing/web-platform/tests/workers/baseurl/alpha/xhr-in-worker.html
new file mode 100644
index 0000000000..bc58b9b2dd
--- /dev/null
+++ b/testing/web-platform/tests/workers/baseurl/alpha/xhr-in-worker.html
@@ -0,0 +1,8 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in classic dedicated workers: XHR</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new Worker("../beta/xhr-worker.py"));
+</script>