diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /gfx/layers/apz/test/mochitest/helper_hittest_fixed_item_over_oop_iframe.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_hittest_fixed_item_over_oop_iframe.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/helper_hittest_fixed_item_over_oop_iframe.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_hittest_fixed_item_over_oop_iframe.html b/gfx/layers/apz/test/mochitest/helper_hittest_fixed_item_over_oop_iframe.html new file mode 100644 index 0000000000..a8b66cb835 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_hittest_fixed_item_over_oop_iframe.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<title>Hit-testing of positioned item on top of oop iframe</title> +<script src="apz_test_utils.js"></script> +<script src="apz_test_native_event_utils.js"></script> +<script src="/tests/SimpleTest/paint_listener.js"></script> +<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1747409 --> +<style> +body, html { + width:100%; + height:100%; + margin:0; +} + +iframe { + width:100%; + height:100%; + position:fixed; + z-index:1; +} + +.over { + position: fixed; + right: 50px; + bottom: 50px; + z-index: 9999; +} +</style> +<div class="over"> + <a id="target" href="#">Link</a> +</div> +<iframe src="https://example.com"></iframe> +<script> +async function test() { + let config = getHitTestConfig(); + let utils = config.utils; + let iframe = document.querySelector("iframe"); + let target = document.getElementById("target"); + + try { + iframe.contentWindow.document; + ok(false, "Should be a cross-origin iframe"); + } catch (ex) {} + + await promiseApzFlushedRepaints(); + + checkHitResult(hitTest(centerOf(target)), + APZHitResultFlags.VISIBLE, + utils.getViewId(document.scrollingElement), + utils.getLayersId(), + "fixed element with z-index"); +} + + +onload = function() { + waitUntilApzStable() + .then(test) + .then(subtestDone, subtestFailed); +}; +</script> |