Closed
Bug 1463584
Opened 6 years ago
Closed 6 years ago
Assert.throws for an empty password in browser_notifications_2.js isn't testing the correct error
Categories
(Toolkit :: Password Manager, defect, P1)
Toolkit
Password Manager
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: standard8, Assigned: MattN)
References
Details
Attachments
(1 file)
In browser_notifications_2.js, there's a bit of code: Assert.throws(notificationElement.button.doCommand(), "Can't add a login with a null or empty password.", "Should fail for an empty password"); There's two problems with this: - Assert.throws expects to be passed a function to be called rather than the result of the called argument. - The second argument is a string, rather than a regexp. When I correct the call, I get a missing expected exception. It appears that CustomizableUI is swallowing the doCommand somehow. This code did get re-arranged in bug 1217134. I suspect this check needs to be changed to something else, but I'm guessing. Matt, can you take a look at this please?
Flags: needinfo?(MattN+bmo)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED
Assignee | ||
Updated•6 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•6 years ago
|
||
We can simply remove that Assert since it's out of place to test it here where the button is disabled and we have thorough tests for empty passwords in https://dxr.mozilla.org/mozilla-central/source/toolkit/components/passwordmgr/test/unit/test_logins_change.js#158-162
Flags: needinfo?(MattN+bmo)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•6 years ago
|
||
Feel free to autoland for me
Reporter | ||
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8979815 [details] Bug 1463584 - Remove invalid Assert.throws from test_empty_password. https://reviewboard.mozilla.org/r/245974/#review252032 Great, thank you for investigating.
Attachment #8979815 -
Flags: review?(standard8) → review+
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eea7f6eebf0f Remove invalid Assert.throws from test_empty_password. r=standard8
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eea7f6eebf0f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•