Closed Bug 1809512 Opened 1 year ago Closed 1 year ago

Replace waitForCondition() with waitForMutationCondition() in toolkit/content/tests/browser/browser_datetime_datepicker_keynav.js

Categories

(Core :: Layout: Form Controls, task)

task

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: ayeddi, Assigned: ayeddi)

Details

Attachments

(1 file)

In toolkit/content/tests/browser/browser_datetime_datepicker_keynav.js replace 2 instances of await BrowserTestUtils.waitForCondition() with await BrowserTestUtils.waitForMutationCondition() per the recommendation from Mike Conley

In toolkit/content/tests/browser/browser_datetime_datepicker_keynav.js replace 2 instances of await BrowserTestUtils.waitForCondition() with await BrowserTestUtils.waitForMutationCondition() per the recommendation, because if possible, we should avoid polling with waitForCondition. If we're waiting for some DOM to change on us, we can use waitForMutationCondition instead, which uses a MutationObserver rather than an interval for polling.

Pushed by ayeddi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4a1eacd09673
Use a MutationObserver in two tests in toolkit/content/tests/browser/browser_datetime_datepicker_keynav.js. r=Jamie,mconley
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: