Open Bug 1803304 Opened 2 years ago Updated 2 years ago

BrowserTestUtils.addContentEventListener() has a race that the function returns even if setting up the given event listener hasn't been finished in the content process

Categories

(Testing :: Mochitest, defect, P3)

Default
defect

Tracking

(Not tracked)

People

(Reporter: hiro, Unassigned)

Details

Though I am not 100% sure (I haven't tested on any example), the function calls flush(), but it doesn't ensure that the event listener has been set in the content process, thus it's possible subsequent JS will affect the content process before the event listener has been set (I suppose the order depends on IPC call priority).

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: -- → S2
Flags: needinfo?(ahal)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.