Closed Bug 474159 Opened 15 years ago Closed 15 years ago

test_notifications.html and test_prompt.html mochitests fail: "notifyBox is undefined"

Categories

(SeaMonkey :: Passwords & Permissions, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
seamonkey2.0a3

People

(Reporter: sgautherie, Assigned: neil)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090117 SeaMonkey/2.0a3pre] (experimental/_m-c_, home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/a3abe1807f71 + bug 446300 patch
 +http://hg.mozilla.org/comm-central/rev/da4ab57196d6 + bug 446300 patch)

{
74037 INFO Running /tests/toolkit/components/passwordmgr/test/test_notifications.html...
74038 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_notifications.html | Access Ci
74039 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_notifications.html | Access Cc
74040 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_notifications.html | Access pwmgr
74041 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_notifications.html | Access prefs
74042 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_notifications.html | Access pref branch
74043 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/components/passwordmgr/test/test_notifications.html | Got notification box
74044 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/components/passwordmgr/test/test_notifications.html | Error thrown during test: notifyBox is undefined - got 0, expected 1
74045 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_notifications.html | Ignoring load of subtest #undefined
}
Flags: wanted1.9.2?
Same error with test_prompt.html
{
74050 INFO Running /tests/toolkit/components/passwordmgr/test/test_prompt.html...
74051 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_prompt.html | Access Ci
74052 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_prompt.html | Access Cc
74053 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_prompt.html | Access Cc[@mozilla.org/passwordmanager/authpromptfactory;1]
74054 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_prompt.html | Access Ci.nsIPromptFactory
74055 INFO TEST-PASS | /tests/toolkit/components/passwordmgr/test/test_prompt.html | promptFac getService()
74056 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/components/passwordmgr/test/test_prompt.html | Got notification box
74057 ERROR TEST-UNEXPECTED-FAIL | /tests/toolkit/components/passwordmgr/test/test_prompt.html | Error thrown during test: notifyBox is undefined - got 0, expected 1
}
Summary: [SeaMonkey] test_notifications.html fails → [SeaMonkey] test_notifications.html and test_prompt.html fail: "notifyBox is undefined"
Presumably SeaMonkey's getNotificationBox() implementation in navigator.js is returning null.
Component: Password Manager → General
Product: Toolkit → SeaMonkey
QA Contact: password.manager → general
http://mxr.mozilla.org/comm-central/search?string=getNotificationBox&case=on&find=%2Fsuite%2F
Summary: [SeaMonkey] test_notifications.html and test_prompt.html fail: "notifyBox is undefined" → test_notifications.html and test_prompt.html fail: "notifyBox is undefined"
Attached patch Proposed patchSplinter Review
So, after reading notification_common.js the problem is that nsLoginManagerPrompter.js hands an XPCNativeWrapped object window to getNotificationBox but the tests don't. This works around the problem by ensuring a wrappedJSObject always exists for the notification box.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #357571 - Flags: review?(sgautherie.bz)
Attachment #357571 - Flags: review?(iann_bugzilla)
Attachment #357571 - Flags: review?(iann_bugzilla) → review+
Attachment #357571 - Flags: review?(sgautherie.bz)
Comment on attachment 357571 [details] [diff] [review]
Proposed patch

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090117 SeaMonkey/2.0a3pre] (experimental/_m-c_, home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/a3abe1807f71 + bug 446300 patch
 +http://hg.mozilla.org/comm-central/rev/da4ab57196d6 + bug 446300 patch)

This patch fixes these two tests;
and doesn't regress anything in |--test-path=toolkit/components/passwordmgr/test|.
Now that the SM/1.9.1 boxes run the tests again, we can see that they have this bug too.
Component: General → Passwords & Permissions
Flags: wanted1.9.2?
OS: Windows 2000 → All
QA Contact: general → privacy
Hardware: x86 → All
Summary: test_notifications.html and test_prompt.html fail: "notifyBox is undefined" → test_notifications.html and test_prompt.html mochitests fail: "notifyBox is undefined"
Target Milestone: --- → seamonkey2.0a3
Pushed changeset d4ed6abeecb3 to comm-central.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
V.Fixed, per tinderboxes.
No longer blocks: CcMcBuildIssues
Status: RESOLVED → VERIFIED
Depends on: 479427
You need to log in before you can comment on or make changes to this bug.