Closed Bug 1016767 Opened 10 years ago Closed 10 years ago

Modify test_imapID.js to use Promises

Categories

(MailNews Core :: Testing Infrastructure, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 32.0

People

(Reporter: sshagarwal, Assigned: sshagarwal)

Details

Attachments

(1 file, 1 obsolete file)

test_imapID.js currently uses asynctestutils, we want it to use
Promises.
Attached patch Patch v1 (obsolete) — Splinter Review
An attempt to convert this asyncUrlListener based test to use promises.
Attachment #8429751 - Flags: review?(kent)
Comment on attachment 8429751 [details] [diff] [review]
Patch v1

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

Looks good, r=me with nits fixed.

::: mailnews/imap/test/unit/test_imapID.js
@@ +3,5 @@
>   * Test to ensure that we handle the RFC2197 ID command.
>   */
>  
>  load("../../../resources/logHelper.js");
>  load("../../../resources/asyncTestUtils.js");

Delete this line, since we are no longer using asyncTestUtils.js

@@ +27,5 @@
> +  IMAPPump.inbox.updateFolderWithListener(null, promiseUrlListener);
> +  yield promiseUrlListener.promise;
> +});
> +
> +add_task(function* checkIDHandling() {

This function is not a generator, so it should be function check... not function* check...
Attachment #8429751 - Flags: review?(kent) → review+
Thanks.
Attachment #8429751 - Attachment is obsolete: true
Attachment #8430907 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/7c14b91b3088
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 32.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: