Closed
Bug 532035
Opened 15 years ago
Closed 15 years ago
/mailnews/test/resources/ cause xpcshell-tests fail on JS strict mode
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.1a1
People
(Reporter: lusian, Assigned: lusian)
References
Details
Attachments
(1 file, 1 obsolete file)
|
9.43 KB,
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
>>>>>>>
../../mailnews/resources/alertTestUtils.js:62: TypeError: anonymous function does not always return a value:
../../mailnews/resources/alertTestUtils.js:62: },
../../mailnews/resources/alertTestUtils.js:62: ...................................................................^
<<<<<<<
Attachment #415340 -
Flags: superreview?(bienvenu)
Attachment #415340 -
Flags: review?(bugzilla)
Updated•15 years ago
|
Attachment #415340 -
Flags: superreview?(bienvenu) → superreview+
Comment 1•15 years ago
|
||
Comment on attachment 415340 [details] [diff] [review]
/mailnews/test/resources/, 0
> var alertUtilsPrompts = {
> alert: function(aDialogTitle, aText) {
> if (typeof alert == "function") {
>- alert(aDialogTitle, aText);
>- return;
>+ return alert(aDialogTitle, aText);
> }
>
> do_throw("alert unexpectedly called: " + aText + "\n");
>+ return 0;
> },
>
> alertCheck: function(aDialogTitle, aText, aCheckMsg, aCheckState) {
...
These two functions shouldn't return a value at all (see http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/base/public/nsIPrompt.idl).
> confirm: function(aDialogTitle, aText) {
> if (typeof confirm == "function") {
> return confirm(aDialogTitle, aText);
> }
>
> do_throw("confirm unexpectedly called: " + aText + "\n");
>+ return 0;
> },
For this function and the following:
confirmCheck
prompt
promptUsernameAndPassword
promptPassword
select
I'd prefer them to return false and not 0 as they are meant to return booleans (yes, the do_throw means it'll never get called, but it will be more consistent with the idl).
> var alertUtilsPromptService = {
With this one again, I'd like to follow the idl return types (which are actually the same as the previous http://mxr.mozilla.org/comm-central/source/mozilla/embedding/components/windowwatcher/public/nsIPromptService.idl).
Attachment #415340 -
Flags: review?(bugzilla) → review-
| Assignee | ||
Comment 2•15 years ago
|
||
Attachment #415340 -
Attachment is obsolete: true
Attachment #419416 -
Flags: review?(bugzilla)
Updated•15 years ago
|
Attachment #419416 -
Flags: review?(bugzilla) → review+
Comment 3•15 years ago
|
||
Checked in: http://hg.mozilla.org/comm-central/rev/a49a504fa002
Thanks for fixing this.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1a1
You need to log in
before you can comment on or make changes to this bug.
Description
•