Commit ee4775f3 authored by Botond Ballo's avatar Botond Ballo
Browse files

Bug 1705412 - Fix intermittent failure of helper_click_interrupt_animation.html. r=tnikkel

As in helper_visual_scrollbars_pagescroll.html, this test performs a
native click on a scrollbar track and needs to wait for the resulting
scroll animation to be kicked off. This fix ensures it waits long
enough.

Differential Revision: https://phabricator.services.mozilla.com/D131885
parent b0c8748f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -40,11 +40,12 @@ async function test() {
  // Click at the bottom of the scrollbar track to trigger a page-down kind of
  // scroll. This should use "desktop zooming" scrollbar code which should
  // trigger an APZ scroll animation.
  await promiseNativeMouseEventWithAPZ({
  await promiseNativeMouseEventWithAPZAndWaitForEvent({
    type: "click",
    target: anchor,
    offsetX: xoffset,
    offsetY: yoffset,
    eventTypeToWait: "mouseup"
  });

  // Run a few frames, that should be enough to let the scroll animation
@@ -60,7 +61,7 @@ async function test() {

  // Now we click on the content, which should cancel the animation. Run
  // everything to reach a stable state.
  await promiseNativeMouseEventWithAPZ({
  await promiseNativeMouseEventWithAPZAndWaitForEvent({
    type: "click",
    target: anchor,
    offsetX: -5,