Closed Bug 1082843 Opened 5 years ago Closed 5 years ago

Global xpcshell head.js shouldn't import Promise.jsm into the global scope

Categories

(Testing :: XPCShell Harness, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla36

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

Right now it's doing that.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8505025 [details] [diff] [review]
Don't import Promise.jsm into the global scope in xpcshell tests

Review of attachment 8505025 [details] [diff] [review]:
-----------------------------------------------------------------

Oops. Good catch.
Attachment #8505025 - Flags: review?(dteller) → review+
There are several test failures:

1) browser/components/loop/test/xpcshell/test_loopservice_dnd.js uses Promise.defer, which is non-standard.
2) browser/components/loop/test/xpcshell/test_loopservice_notification.js -- same thing
3) browser/components/loop/test/xpcshell/test_loopservice_busy.js -- same thing
4) extensions/cookie/test/unit/test_permmanager_defaults.js -- same thing

I'm going to fix them by using the hack Bobby did in bug 1065185 for marionette tests.
Or I guess I could make those tests explicitly import Promise.jsm
Er, and:

5) toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js -- same thing
Attached patch The test fixesSplinter Review
Attachment #8505163 - Flags: review?(dteller)
Attachment #8505163 - Flags: review?(dteller) → review+
https://hg.mozilla.org/mozilla-central/rev/d343b4bb2bc0
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.