Bug 1798683 - Fix intermittent browser/components/extensions/test/browser/browser_uni...
commitd1c53f86f9131799012894ada53e07baad88dfcb
authorWilliam Durand <will+git@drnd.me>
Wed, 8 Feb 2023 09:52:44 +0000 (8 09:52 +0000)
committerWilliam Durand <will+git@drnd.me>
Wed, 8 Feb 2023 09:52:44 +0000 (8 09:52 +0000)
treeb33965444991122e1730c59bf321ca46ec25d25a
parent5aff50ce878ca6bd93d8253632b121848dc7d8b4
Bug 1798683 - Fix intermittent browser/components/extensions/test/browser/browser_unified_extensions_overflowable_toolbar.js. r=rpl CLOSED TREE

This patch attempts to fix intermittent failures by:

1. using `ensureMaximizedWindow()` where appropriate. While nothing
   seemed wrong per se with the previous approach, resizing to the
   original height was done to restore the previous window dimensions.
   Since the window is maximized before, it makes sense to reuse this
   helper function, especially given that it is a bit more robust than
   just awaiting an event.
2. not awaiting the `resize` event, which does not seem to be fired all
   the time when `resizeBy()` is used. It was mostly fine, except when
   it wasn't... Since we have a `.waitForCondition()` call right after,
   we can probably skip the await of this event.

Differential Revision: https://phabricator.services.mozilla.com/D169088
browser/components/extensions/test/browser/browser_unified_extensions_overflowable_toolbar.js
browser/components/extensions/test/browser/head_unified_extensions.js