Closed Bug 1589138 Opened Last month Closed Last month

Make BrowserTestUtils.addContentEventListener take an options object for the listener

Categories

(Testing :: Mochitest, task, P2)

Version 3
task

Tracking

(firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

This method takes two booleans that it passes along as arguments to addEventListener. kmag pointed out that it would make more sense to take a single argument that is an event listener options object. This reduces the amount of plumbing a little bit, and allows for future flexibility.

Of the tests that use these extra options, all but browser_bug744745.js pass without being fixed, which seems a little weird.

All but browser_bug744745.js seem to pass even without the fixes I
made, which seems odd.

browser_bug1058164.js is a little odd because it passes in {} instead
of a boolean for the useCapture argument. I think this ends up calling
addEventListener(..., {}, false), which should be the equivalent of
addEventListener(..., {}).

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ca55578623da
Make addContentEventListener take an options object for the listener. r=Gijs
Status: NEW → RESOLVED
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.