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_zoom_oopif.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_zoom_oopif.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/helper_zoom_oopif.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_zoom_oopif.html b/gfx/layers/apz/test/mochitest/helper_zoom_oopif.html new file mode 100644 index 0000000000..788fa31bbb --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_zoom_oopif.html @@ -0,0 +1,54 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width"> + <title>Sanity check for pinch zooming oop iframe</title> + <script type="application/javascript" src="apz_test_native_event_utils.js"></script> + <script type="application/javascript" src="apz_test_utils.js"></script> + <script src="/tests/SimpleTest/paint_listener.js"></script> + <script src="/tests/SimpleTest/EventUtils.js"></script> + <script type="application/javascript"> + +async function test() { + let useTouchpad = (location.search == "?touchpad"); + + let thetarget = document.getElementById("target"); + let r = thetarget.getBoundingClientRect(); + let x = r.x + r.width/2; + let y = r.y + r.height/2; + + let initial_resolution = await getResolution(); + ok(initial_resolution > 0, + "The initial_resolution is " + initial_resolution + ", which is some sane value"); + if (useTouchpad) { + await pinchZoomInWithTouchpad(x, y); + } else { + await pinchZoomInWithTouch(x, y); + } + // Flush state and get the resolution we're at now + await promiseApzFlushedRepaints(); + let final_resolution = await getResolution(); + ok(final_resolution > initial_resolution, "The final resolution (" + final_resolution + ") is greater after zooming in"); +} + +waitUntilApzStable() +.then(test) +.then(subtestDone, subtestFailed); + + </script> +<style> +iframe { + margin: 0; + padding: 0; + border: 1px solid black; +} +</style> + +</head> +<body> + +<iframe id="target" width="100" height="100" src="http://example.org/"></iframe> + +</body> +</html> |