Closed Bug 670830 Opened 13 years ago Closed 10 years ago

click() should not be called on menuitem elements

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: rain1, Unassigned)

References

Details

Attachments

(1 file)

See bug 670829 for the reason why. This means that checkbox menuitems are currently completely broken with MozMill.

One way to fix this might be to just remove the code that specializes in menu items and synthesize a mouse event, but I don't know if that'd work on Mac.
Blocks: 581661
Sid, so what type of mouse event we would have to synthesize?
Just a regular click should suffice.
We cannot perform a regular click at least not on OS X where we do not have access to the native menubar.
Enn, any ideas for what we could do here? I guess our only option might be to set checked, then call click().
Are you trying to simulate a real mouse click? The click() method doesn't do that. The closest you can get are the methods in nsIDOMWindowUtils.
Yeah, but whimboo pointed out those won't work on Mac with its native menubar.
You can test activating native-mac menuitems with activateNativeMenuItemAt.
I don't think we need to worry about the Mac native menubar (though it'd be nice). The Mozmill tests for Thunderbird that are affected by this use context menus.
We have to worry about it in MozMill.

(In reply to comment #7)
> You can test activating native-mac menuitems with activateNativeMenuItemAt.

Excellent, that looks like it'll work.
Attached patch The start of a patch (deleted) β€” β€” Splinter Review
This is a good starting point I guess. However we need to work out how much to break the API. Currently click() doesn't close the menu item (even though I think it should), and it doesn't seem like select() is meant to be used for menubar menus (even though I think we should have a method to do just that).
Sid, sorry that we forgot about this bug. Meanwhile we do not want to ship further releases for 1.5 anymore, except it is really necessary. Would you mind to adapt this patch to the master branch of the mozmill repository so we could have it included in Mozmill 2? That would be great.
I think I can do that later.
Mozmill will reach its end of life soon. We are currently working on getting
all the tests for Firefox ported to Marionette. For status updates please see
bug 1080766.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: