summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fetch/connection-pool/resources/network-partition-checker.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/fetch/connection-pool/resources/network-partition-checker.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/fetch/connection-pool/resources/network-partition-checker.html')
-rw-r--r--testing/web-platform/tests/fetch/connection-pool/resources/network-partition-checker.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fetch/connection-pool/resources/network-partition-checker.html b/testing/web-platform/tests/fetch/connection-pool/resources/network-partition-checker.html
new file mode 100644
index 0000000000..b058f61124
--- /dev/null
+++ b/testing/web-platform/tests/fetch/connection-pool/resources/network-partition-checker.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <title>Network Partition Checker</title>
+ <meta name="help" href="https://fetch.spec.whatwg.org/#network-partition-keys">
+ <meta name="timeout" content="normal">
+ <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=common/utils.js"></script>
+ <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=resources/testharness.js"></script>
+ <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=fetch/connection-pool/resources/network-partition-key.js"></script>
+</head>
+<body>
+<script>
+ async function fetch_and_reply() {
+ // If this is a top level window, report to the opener. Otherwise, this is an iframe,
+ // so report to the parent.
+ var report_to = window.opener;
+ if (!report_to)
+ report_to = window.parent;
+ try {
+ await check_partition_ids();
+ report_to.postMessage({result: 'success'}, '*');
+ } catch (e) {
+ report_to.postMessage({result: 'error', details: e.message}, '*');
+ }
+ }
+ fetch_and_reply();
+</script>
+</body>
+</html>