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_with_dynamic_toolbar.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_zoom_with_dynamic_toolbar.html')
-rw-r--r-- | gfx/layers/apz/test/mochitest/helper_zoom_with_dynamic_toolbar.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_zoom_with_dynamic_toolbar.html b/gfx/layers/apz/test/mochitest/helper_zoom_with_dynamic_toolbar.html new file mode 100644 index 0000000000..261bca1377 --- /dev/null +++ b/gfx/layers/apz/test/mochitest/helper_zoom_with_dynamic_toolbar.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<html> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width"> + <title>Zooming out to the initial scale with the dynamic toolbar</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> + + <style> + html,body { + height: 100%; + margin: 0; + padding: 0; + } + </style> + + <script type="application/javascript"> + +async function test() { + ok(window.visualViewport.scale > 1.0, + "The scale value should be greater than 1.0"); + + // Do a pinch-zoom out to restore the initial scale. + await pinchZoomOutWithTouchAtCenter(); + await promiseApzFlushedRepaints(); + + is(visualViewport.scale, 1.0, + "The initial scale value should be restored to 1.0"); +} + +SpecialPowers.getDOMWindowUtils(window).setDynamicToolbarMaxHeight(100); +SpecialPowers.getDOMWindowUtils(window).setResolutionAndScaleTo(1.1) + +waitUntilApzStable() +.then(test) +.then(subtestDone, subtestFailed); + + </script> +</head> +<body> +</body> +</html> |