summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fetch/api/resources/keepalive-iframe.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/fetch/api/resources/keepalive-iframe.html')
-rw-r--r--testing/web-platform/tests/fetch/api/resources/keepalive-iframe.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fetch/api/resources/keepalive-iframe.html b/testing/web-platform/tests/fetch/api/resources/keepalive-iframe.html
new file mode 100644
index 0000000000..ac00f3a331
--- /dev/null
+++ b/testing/web-platform/tests/fetch/api/resources/keepalive-iframe.html
@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+<meta charset="utf-8">
+<script>
+const SEARCH_PARAMS = new URL(location.href).searchParams;
+const TOKEN = SEARCH_PARAMS.get('token') || '';
+const METHOD = SEARCH_PARAMS.get('method') || 'GET';
+const url = `/fetch/api/resources/stash-put.py?key=${TOKEN}&value=on`;
+
+addEventListener('load', () => {
+ let p = fetch(url, {keepalive: true, method: METHOD});
+ window.parent.postMessage(TOKEN, '*');
+});
+</script>
+</html>