Closed Bug 1716982 Opened 3 years ago Closed 3 years ago

Replace waitForEvent use in preferences tests with BrowserTestUtils.waitForEvent

Categories

(Firefox :: Settings UI, task, P3)

Desktop
All
task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: standard8, Assigned: mathew.hodson, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=js])

Attachments

(1 file)

This is a good first bug for newcomers to Firefox development.

waitForEvent in the browser/components/preferences test directory can be replaced by the BrowserTestUtils.waitForEvent utility function.

The code in question is here: https://searchfox.org/mozilla-central/search?q=+waitForEvent&path=preferences&case=false&regexp=false

Once replaced, the function definition in the head.js file can be removed. In addition to removing the function, the import for Promise should also be able to be removed.

For instructions on how to get your local build of Firefox up and running and submit your patch, see https://developer.mozilla.org/en-US/docs/Introduction.

You can run the tests with the ./mach mochitest command:

./mach mochitest browser/components/preferences

This will run all the tests in the directory, to make sure that the head.js changes don't adversely affect anything else.

You should also make sure that ESLint passed:

./mach eslint browser/components/preferences

Note this bug will be auto-assigned when the first patch is attached.

Assignee: nobody → mathew.hodson
Status: NEW → ASSIGNED
Severity: -- → S3
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → Desktop
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/31fe68d72de8
Use BrowserTestUtils.waitForEvent in preferences tests. r=Standard8,preferences-reviewers
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: