diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-sticky-activation-popup.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-sticky-activation-popup.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-sticky-activation-popup.html b/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-sticky-activation-popup.html new file mode 100644 index 0000000000..23bf8a440d --- /dev/null +++ b/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-sticky-activation-popup.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Beforeunload must be gated behind sticky activation: auxiliary browsing context</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<p>If you happen to be running this test as a human, then be sure not to interact with any part of the page; that would invalidate the results! + +<script> +setup({ single_test: true }); + +const w = window.open('support/beforeunload-sticky-start.html'); + +window.onmessage = e => { + assert_equals(e.data, 'navigated successfully'); + + const desiredURL = (new URL('support/beforeunload-sticky-destination.html', location.href)).href; + assert_equals(w.location.href, desiredURL); + + w.close(); + + done(); +}; +</script> |