Closed
Bug 1508851
Opened 6 years ago
Closed 6 years ago
nsIMsgLocalMailFolder unit tests succeed where they probably shouldn't
Categories
(Thunderbird :: Testing Infrastructure, defect)
Thunderbird
Testing Infrastructure
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 65.0
People
(Reporter: benc, Assigned: benc)
References
Details
Attachments
(1 file)
(deleted),
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
In mailnews/local/test/unit/test_nsIMsgLocalMailFolder.js (line 267):
folder3 = root.createLocalSubfolder("newfolder3");
folder3SubFolder = folder3.createLocalSubfolder("newfolder3-sub");
createLocalSubfolder() is a method on nsIMsgLocalMailFolder, but it returns an nsIMsgFolder, so the second line _should_ fail (ie "ERROR TypeError: folder3.createLocalSubfolder is not a function...").
But it doesn't fail.
`folder3` is previously defined and used at line 244:
let folder3 = root.createLocalSubfolder("newfolder3")
.QueryInterface(Ci.nsIMsgLocalMailFolder);
I _think_ that the second createLocalSubfolder() call at line 267 is failing, but not flagging up an error, and leaving folder3 set to the old value (an nsIMsgLocalFolder).
Which implies that createLocalSubfolder() doesn't work exactly as intended...
This came up as part of work on Bug 453908, when this test _did_ start failing on line 268 (as it always should have!).
My C++ patch in Bug 453908 might fix the createLocalSubfolder() issue (It's at least a step in the right direction).
Assignee | ||
Comment 1•6 years ago
|
||
Oh, to save some typing, here's a cut&paste command line run the test:
./mach xpcshell-test comm/mailnews/local/test/unit/test_nsIMsgLocalMailFolder.js
Assignee | ||
Comment 2•6 years ago
|
||
This patch fixes up the nsIMsgLocalMailFolder unit test.
Doesn't address any potential issue in CreateLocalSubfolder(), but that might be a non-issue depending on how Bug 453908 goes.
Assignee: nobody → benc
Attachment #9026565 -
Flags: review?(mkmelin+mozilla)
Comment 3•6 years ago
|
||
Comment on attachment 9026565 [details] [diff] [review]
fix_nsimsglocalmailfolder_test.patch
Review of attachment 9026565 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, r=mkmelin
Attachment #9026565 -
Flags: review?(mkmelin+mozilla) → review+
Updated•6 years ago
|
Status: NEW → ASSIGNED
Keywords: checkin-needed
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/0e9bf22a6b17
fix for nsIMsgLocalMailFolder unit test. r=mkmelin
Updated•6 years ago
|
Target Milestone: --- → Thunderbird 65.0
You need to log in
before you can comment on or make changes to this bug.
Description
•