diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /gfx/layers/apz/test/reftest/zoom-to-focus-input-oopif-ref.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/reftest/zoom-to-focus-input-oopif-ref.html')
-rw-r--r-- | gfx/layers/apz/test/reftest/zoom-to-focus-input-oopif-ref.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/reftest/zoom-to-focus-input-oopif-ref.html b/gfx/layers/apz/test/reftest/zoom-to-focus-input-oopif-ref.html new file mode 100644 index 0000000000..62ab61df88 --- /dev/null +++ b/gfx/layers/apz/test/reftest/zoom-to-focus-input-oopif-ref.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta name="viewport" content="width=device-width"> +<style> +iframe { + position: absolute; + width: 1600px; + height: 2000px; + top: 200px; + left: 100px; +} +</style> +<iframe src="zoom-to-focus-input-subframe.html"></iframe> +<script> +document.addEventListener('MozReftestInvalidate', async () => { + const transformEndPromise = new Promise(resolve => { + SpecialPowers.Services.obs.addObserver(function observer() { + SpecialPowers.Services.obs.removeObserver(observer, "APZ:TransformEnd"); + resolve(); + }, "APZ:TransformEnd"); + }); + + const iframe = document.querySelector("iframe"); + const input = iframe.contentDocument.querySelector("input"); + input.focus(); + SpecialPowers.DOMWindowUtils.zoomToFocusedInput(); + + await transformEndPromise; + + document.documentElement.classList.remove('reftest-wait'); +}); +</script> +</html> |