Closed
Bug 1142108
Opened 9 years ago
Closed 9 years ago
Make TestUtils.topicObserved cover more use cases
Categories
(Testing :: General, defect)
Testing
General
Tracking
(firefox39 fixed)
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: Paolo, Assigned: Paolo)
References
Details
Attachments
(1 file)
4.52 KB,
patch
|
smacleod
:
review+
|
Details | Diff | Splinter Review |
Sometimes the subject of an observer notification is the interesting result when a topic is observed, while sometimes the data string is. The TestUtils.topicObserved API can be made more flexible by using a callback to determine if the notification is relevant, and resolving with the subject and data. For example, for checking that a login is added to the database: let promiseLogin = TestUtils.topicObserved("passwordmgr-storage-changed", (_, data) => data == "addLogin"); let [login] = yield promiseLogin; In this patch I've also fixed an unterminated promise chain.
Attachment #8576058 -
Flags: review?(smacleod)
Assignee | ||
Updated•9 years ago
|
Iteration: --- → 39.2 - 23 Mar
Points: --- → 1
Flags: firefox-backlog+
Comment 1•9 years ago
|
||
Comment on attachment 8576058 [details] [diff] [review] The patch Review of attachment 8576058 [details] [diff] [review]: ----------------------------------------------------------------- oo, I like this change a lot :D
Attachment #8576058 -
Flags: review?(smacleod) → review+
Assignee | ||
Comment 2•9 years ago
|
||
Thanks for the quick review! Will land when the tree reopens.
Updated•9 years ago
|
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/d1ffaeb0dbfd
Comment 4•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d1ffaeb0dbfd
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•