Closed
Bug 568287
Opened 15 years ago
Closed 14 years ago
Expand test for 'Copy Password' context menu item in Password Manager
Categories
(Toolkit :: Password Manager, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a5
People
(Reporter: fryn, Assigned: fryn)
References
Details
Attachments
(1 file, 3 obsolete files)
3.32 KB,
patch
|
Dolske
:
review+
|
Details | Diff | Splinter Review |
Also replaces <popup /> with <menupopup /> in the actual code.
Attachment #447563 -
Flags: review?(dolske)
Blocks: 568181
Comment 2•14 years ago
|
||
Comment on attachment 447563 [details] [diff] [review]
patch v1
Patch is fine, but please update since zpao just changed this test a bit in bug 568995.
Attachment #447563 -
Flags: review?(dolske)
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #447563 -
Attachment is obsolete: true
Attachment #449411 -
Flags: review?(dolske)
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #449411 -
Attachment is obsolete: true
Attachment #449412 -
Flags: review?(dolske)
Attachment #449411 -
Flags: review?(dolske)
Comment 5•14 years ago
|
||
Comment on attachment 449412 [details] [diff] [review]
patch v2.1 (now using SimpleTest.waitForClipboard)
>+ isMenuitemDisabled("true");
This feels very awkward.
It's would be cleaner to just have isMenuitemDisabled() return true or false, and move the is() checks into the caller. And flip the logic so it's isMenuitemEnabled (to prevent double-negatives). EG:
is(isMenuitemEnabled(), true, "should be enabled")
...
is(isMenuitemEnabled(), false, "should be disabled")
>+ selection.select(2);
>+ if (isMenuitemDisabled(""))
>+ menuitem.doCommand();
>+ }
The test shouldn't have conditional branches, this should just be:
selection.select(2);
is(isMenuItemEnabled(), true, "should be enabled");
menuitem.doCommand().
If the menuitem is somehow actually disabled, the is() check will fail and it's ok to blow up after that.
Otherwise looks fine.
Attachment #449412 -
Flags: review?(dolske) → review-
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #449412 -
Attachment is obsolete: true
Attachment #449954 -
Flags: review?(dolske)
Comment 7•14 years ago
|
||
Comment on attachment 449954 [details] [diff] [review]
patch v2.2 (no mo' awkwardness)
>+ return !menuitem.getAttribute("disabled");
Oh, I suppose that could be just !menuitem.disabled, but I don't care either way since it's just a test.
Attachment #449954 -
Flags: review?(dolske) → review+
Updated•14 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 8•14 years ago
|
||
(In reply to comment #7)
> (From update of attachment 449954 [details] [diff] [review])
> >+ return !menuitem.getAttribute("disabled");
>
> Oh, I suppose that could be just !menuitem.disabled, but I don't care either
> way since it's just a test.
My reaction to reading this sentence:
OTL......... \o/
Comment 9•14 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/0eed88315d8e (didn't bother with the !menuitem.disabled change)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in
before you can comment on or make changes to this bug.
Description
•