Closed Bug 916887 Opened 11 years ago Closed 11 years ago

waitForEvent mochitest helper can get callbacks out of sequence

Categories

(Firefox for Metro Graveyard :: Tests, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 27

People

(Reporter: sfoster, Assigned: sfoster)

Details

Attachments

(1 file)

the waitForEvent method adds a callback to clean up its own event listeners, but the promise that it returns is resolved *before* this runs. This could allow test code to proceed before that cleanup has occurred, and callbacks could get out of sequence. 
Patch incoming.
Attached patch fix-waitForEventSplinter Review
While troubleshooting some of our intermittent test failures, I noticed waitForEvent returns the wrong promise. This could do bad things. 
Clean test run  locally (barring known failures in browser_bookmarks.js). Try run in progress: https://tbpl.mozilla.org/?tree=Try&rev=c9b13b2872df
Assignee: nobody → sfoster
Attachment #805476 - Flags: review?(mbrubeck)
Attachment #805476 - Flags: review?(mbrubeck) → review+
Try run looked good - just one orange for the urlbar_trimurl tests (bug 915620)
Landed on fx-team: https://hg.mozilla.org/integration/fx-team/rev/ff6b66d933fb
https://hg.mozilla.org/mozilla-central/rev/ff6b66d933fb
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: