Closed Bug 1093027 Opened 5 years ago Closed 5 years ago

Don't use deprecated Promise.defer in unit tests

Categories

(Hello (Loop) :: Client, defect, P1, major)

defect
Points:
1

Tracking

(firefox35 fixed, firefox36 fixed)

RESOLVED FIXED
mozilla36
Iteration:
36.2
Tracking Status
firefox35 --- fixed
firefox36 --- fixed

People

(Reporter: mikedeboer, Assigned: mikedeboer)

References

Details

Attachments

(2 files)

Since bug 1083989 landed, our tests have become incompatible with the way Promise.jsm should be referenced.

There are two ways to fix this: load Promise.jsm explicitly in each test or convert to the `new Promise((resolve, reject) => {})` syntax.

`Promise.defer()` is now deprecated as it is incompatible with DOM Promises.
Flags: qe-verify-
Flags: needinfo?(mmucci)
Flags: firefox-backlog+
Attached patch Patch v1: no wsSplinter Review
Comment on attachment 8515925 [details] [diff] [review]
Patch v1: stop using Promise.defer in Loop mochitests

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

Looks good, r=Standard8 with the nit addressed.

::: browser/components/loop/test/mochitest/browser_LoopContacts.js
@@ +202,5 @@
> +      Assert.ok(!err, "There shouldn't be an error");
> +      compareContacts(contact, kContacts[1]);
> +      resolve();
> +    });
> +});

nit: needs two-space indent I think
Attachment #8515925 - Flags: review?(standard8) → review+
Added to IT 36.2
Flags: needinfo?(mmucci)
https://hg.mozilla.org/mozilla-central/rev/90161c011c6c
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment on attachment 8515925 [details] [diff] [review]
Patch v1: stop using Promise.defer in Loop mochitests

Approval Request Comment
Landed on aurora per IRC with lsblakk with a=loop-only
Attachment #8515925 - Flags: approval-mozilla-aurora?
Attachment #8515925 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.