summaryrefslogtreecommitdiffstats
path: root/gfx/layers/apz/test/mochitest/helper_touch_synthesized_mouseevents.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /gfx/layers/apz/test/mochitest/helper_touch_synthesized_mouseevents.html
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/apz/test/mochitest/helper_touch_synthesized_mouseevents.html')
-rw-r--r--gfx/layers/apz/test/mochitest/helper_touch_synthesized_mouseevents.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/gfx/layers/apz/test/mochitest/helper_touch_synthesized_mouseevents.html b/gfx/layers/apz/test/mochitest/helper_touch_synthesized_mouseevents.html
index 3930cec3c3..b3d7b4352a 100644
--- a/gfx/layers/apz/test/mochitest/helper_touch_synthesized_mouseevents.html
+++ b/gfx/layers/apz/test/mochitest/helper_touch_synthesized_mouseevents.html
@@ -76,6 +76,13 @@ async function test() {
promiseOneEvent(targetElem, "click"),
];
+ // Create a promise for :active state change since in the case where the
+ // target element is inside a scrollable container, APZ delays :active state
+ // change, it sometimes happens after all the relavant events above.
+ const activePromise = SimpleTest.promiseWaitForCondition(
+ () => targetElem.matches(":active"),
+ "Waiting for :active state change");
+
// Perform a tap gesture
await synthesizeNativeTap(targetElem, 50, 50);
@@ -88,7 +95,7 @@ async function test() {
// The value of ui.touch_activation.duration_ms should be set to
// a large value. If we did not delay sending the synthesized
// mouse events, this test will not timeout.
- await Promise.all(mouseEventPromises);
+ await Promise.all([...mouseEventPromises, activePromise]);
clearTimeout(failTimeout);