messageGenerator should use AddMessage

RESOLVED FIXED

Status

Thunderbird
Testing Infrastructure
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

7 years ago
Created attachment 543200 [details] [diff] [review]
proposed fix

mailnews/test/resources/messageGenerator writes directly to a berkeley mailbox. It should use addMessage instead and let the folder handle it.

this is fallout from the pluggable store work, but I've separated it out as part of my effort to make that patch smaller.
Attachment #543200 - Flags: review?(sid.bugzilla)
Comment on attachment 543200 [details] [diff] [review]
proposed fix

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

::: mailnews/test/resources/messageGenerator.js
@@ +633,2 @@
>      for (let iMessage = 0; iMessage < aMessages.length; iMessage++) {
> +    aFolder.addMessage(aMessages[iMessage].toMboxString());

Please
- fix the indentation of the for loop
- consider using for ( .. in Iterator(..)) instead
- either use localFolder rather than aFolder, or remove localFolder entirely
Attachment #543200 - Flags: review?(sid.bugzilla) → review+
(Assignee)

Comment 2

7 years ago
Created attachment 543218 [details] [diff] [review]
fix addressing comments

This is what I checked in - turned out the doc comments for the method were out of date as well.
Assignee: nobody → dbienvenu
Status: NEW → ASSIGNED
(Assignee)

Comment 3

7 years ago
http://hg.mozilla.org/comm-central/rev/8a89b84f1380
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.