Open Bug 1772490 Opened 2 years ago Updated 2 years ago

`BrowserTestUtils.waitForPopupEvent` should return `Promise.reject()` when the popup is already in the expected state

Categories

(Testing :: Mochitest, defect, P3)

Default
All
Unspecified
defect

Tracking

(Not tracked)

People

(Reporter: mbrodesser-Igalia, Unassigned)

Details

See https://searchfox.org/mozilla-central/rev/3a1b5e963e92d478b2b4c0f0ddbbefd23aacc05e/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm#1352-1353,1365.

Currently, await BrowserTestUtils.waitForPopupEvent(somePopup, "hidden"); would pass, if somePopup is already hidden.

Blocks: 1744524
No longer blocks: 1744524
Summary: Shouldn't `BrowserTestUtils.waitForPopupEvent` return `Promise.reject()` when the popup is already in the expected state? → `BrowserTestUtils.waitForPopupEvent` should return `Promise.reject()` when the popup is already in the expected state

The severity field is not set for this bug.
:ahal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)
Severity: -- → S3
Flags: needinfo?(ahal)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.