summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-start.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-start.html')
-rw-r--r--testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-start.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-start.html b/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-start.html
new file mode 100644
index 0000000000..37109feafe
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-start.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Beforeunload must be gated behind sticky activation: start page</title>
+
+<p>This page will immediately navigate. If a beforeunload dialog pops up, the test fails.</p>
+
+<script>
+window.onbeforeunload = e => e.preventDefault();
+location.href = 'beforeunload-sticky-destination.html';
+</script>