Skip to content

Commit

Permalink
Fix the popover-events.html failure in wpt.fyi.
Browse files Browse the repository at this point in the history
At D176675, we replaced the call of waitForRender() with waitForTick() due
to Intermittent result for the test(Bug 1828826). However, wpt.fyi result (which
is now available after we enabled nightly) shows that the test fails.

Reverting waitForTick() to waitForRender() seems fix the issue at wpt.fyi.
A follow-up patch might be needed to update .ini expectation file if there is
intermittent compalins from Gecko run.

Differential Revision: https://phabricator.services.mozilla.com/D195091

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1867486
gecko-commit: e1af579f3385dd2aac37a6f13fa461de05c14f3f
gecko-reviewers: emilio
  • Loading branch information
ziransun authored and moz-wptsync-bot committed Dec 1, 2023
1 parent 3e0c565 commit 9845ce8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions html/semantics/popovers/popover-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
assert_equals(0,hideCount);
assert_equals(0,afterShowCount);
assert_equals(0,afterHideCount);
await waitForTick();
await waitForRender();
assert_equals(1,afterShowCount,'toggle show is fired asynchronously');
assert_equals(0,afterHideCount);
assert_true(popover.matches(':popover-open'));
Expand All @@ -96,12 +96,12 @@
assert_equals(1,hideCount);
assert_equals(1,afterShowCount);
assert_equals(0,afterHideCount);
await waitForTick();
await waitForRender();
assert_equals(1,afterShowCount);
assert_equals(1,afterHideCount,'toggle hide is fired asynchronously');
// No additional events
await waitForTick();
await waitForTick();
await waitForRender();
await waitForRender();
assert_false(popover.matches(':popover-open'));
assert_equals(1,showCount);
assert_equals(1,hideCount);
Expand Down Expand Up @@ -139,8 +139,8 @@
assert_true(popover.matches(':popover-open'));
t.add_cleanup(() => {document.body.appendChild(popover);});
popover.remove();
await waitForTick(); // Check for async events also
await waitForTick(); // Check for async events also
await waitForRender(); // Check for async events also
await waitForRender(); // Check for async events also
assert_false(popover.matches(':popover-open'));
}, 'The "beforetoggle" event is not fired for element removal');

Expand Down Expand Up @@ -188,27 +188,27 @@
assertOnly('none');
assert_false(popover.matches(':popover-open'));
popover.showPopover();
await waitForTick();
await waitForRender();
assert_true(popover.matches(':popover-open'));
assertOnly('singleShow','Single event should have been fired, which is a "show"');

resetEvents();
popover.hidePopover();
popover.showPopover(); // Immediate re-show
await waitForTick();
await waitForRender();
assert_true(popover.matches(':popover-open'));
assertOnly('coalescedShow','Single coalesced event should have been fired, which is a "show"');

resetEvents();
popover.hidePopover();
await waitForTick();
await waitForRender();
assertOnly('singleHide','Single event should have been fired, which is a "hide"');
assert_false(popover.matches(':popover-open'));

resetEvents();
popover.showPopover();
popover.hidePopover(); // Immediate re-hide
await waitForTick();
await waitForRender();
assertOnly('coalescedHide','Single coalesced event should have been fired, which is a "hide"');
assert_false(popover.matches(':popover-open'));
}, 'The "toggle" event is coalesced');
Expand Down

0 comments on commit 9845ce8

Please sign in to comment.