Closed Bug 1706472 Opened 4 years ago Closed 4 years ago

Make activateItem throw an exception if it's called before the menu has opened

Categories

(Core :: Widget: Cocoa, task)

All
macOS
task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox89 --- fixed
firefox90 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Whiteboard: [proton-uplift])

Attachments

(1 file)

This test-only API should be checking that the menu is open.

Menu opening with native context menus is asynchronous, so this case is hit in more cases than with non-native context menus. The exception will show us which tests will need to handle the asynchronicity.

One example of this is devtools/client/framework/test/browser_toolbox_backward_forward_navigation.js, which calls expandAllSourceNodes, which synchronously first opens the menu and then immediately activates an item in it.

We were already checking this for submenus but forgot to do it for the root menu.

Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/0fddc0b1735d Make activateItem throw an exception if it's called before the menu is open. r=harry
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Whiteboard: [proton-uplift]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: