diff options
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.html | 30 |
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> |