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_disallow_doubletap_zoom_inside_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_disallow_doubletap_zoom_inside_oopif.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html b/gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html new file mode 100644 index 0000000000..2c83cb1a1f --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_disallow_doubletap_zoom_inside_oopif.html @@ -0,0 +1,58 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="user-scalable=no"/> + <title>Check that double tapping inside an oop iframe doesn't work if the top + level content document doesn't allow zooming</title> + <script src="apz_test_native_event_utils.js"></script> + <script src="apz_test_utils.js"></script> + <script src="/tests/SimpleTest/paint_listener.js"></script> + <script> + +async function test() { + let useTouchpad = (location.search == "?touchpad"); + + let resolution = await getResolution(); + ok(resolution > 0, + "The initial_resolution is " + resolution + ", which is some sane value"); + + // Set up a Promise waiting for a TransformEnd which should never happen. + promiseTransformEnd().then(() => { + ok(false, "No TransformEnd should happen!"); + }); + + // A double tap inside the OOP iframe. + await synthesizeDoubleTap(document.getElementById("target"), 20, 20, useTouchpad); + + for (let i = 0; i < 10; i++) { + await promiseFrame(); + } + + // Flush state just in case. + await promiseApzFlushedRepaints(); + + let prev_resolution = resolution; + resolution = await getResolution(); + is(resolution, prev_resolution, "No zoom should happen"); +} + +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> |