diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html')
-rw-r--r-- | testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html new file mode 100644 index 0000000000..2cd8fcf786 --- /dev/null +++ b/testing/web-platform/tests/fenced-frame/resources/navigate-ancestor-helper.https.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<title>Navigate ancestor helper</title> + +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-actions.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="utils.js"></script> +<body> +<script> +(async () => { + // This document is loaded into either a top-level fenced frame, a nested + // fenced frame, or an iframe in a top-level fenced frame. In any case, this + // document is always the inner-most document in any test. It navigates an + // ancestor frame by clicking the anchor above via script. When this document + // is loaded in a fenced frame, the frame that should actually navigate is + // this one, since fenced frames are top-level browsing contexts. + // When this document is loaded into a top-level fenced frame or a nested + // fenced frame, we test that the right frame is navigated in + // `navigate-ancestor-test-runner.https.html`. When this document is loaded + // into an iframe in a top-level fenced frame, we test that the navigation is + // blocked due to the sandbox behavior of fenced frame trees. + const [navigate_ancestor_key, ancestor_type] = parseKeylist(); + const url = generateURL(`navigate-ancestor-destination.https.html`, + [navigate_ancestor_key]); + await simulateGesture(); + try { + window[ancestor_type].location = url; + } catch (e) { + window[ancestor_type].postMessage('location change failed.'); + } +})(); +</script> +</body> |