diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-destination.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-destination.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-destination.html b/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-destination.html new file mode 100644 index 0000000000..2edcf1a43b --- /dev/null +++ b/testing/web-platform/tests/html/browsers/browsing-the-web/unloading-documents/support/beforeunload-sticky-destination.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Beforeunload must be gated behind sticky activation: destination page</title> + +<p>If you reached this page without clicking through a confirmation dialog, then the test has passed! + +<script> +if (window.opener) { + window.opener.postMessage('navigated successfully'); +} else if (window.parent) { + window.parent.postMessage('navigated successfully'); +} +</script> |