Closed Bug 2095817 Opened 5 days ago Closed 2 days ago

test_panel_list_contextmenu.html leaves the browser's context menu open, failing its repeat run

Categories

(Firefox :: Menus, task)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

testContextMenuPassesWithoutTheAttribute in toolkit/content/tests/widgets/test_panel_list_contextmenu.html dispatches a contextmenu event in the panel and doesn't prevent its default. Because chrome tests run in browser.xhtml, this opens the browser's contentAreaContextMenu, and the menu stays open. When the test runs a second time in the same browser (mochitest-chrome-repeat), the synthesized mouse events of testContextMenuSurvivesTriggeringMouseUp hit that popup instead of the anchor button, so the panel never opens and the test times out.

The fix records defaultPrevented from a one-shot document listener, which runs after panel-list's own listener, and then prevents the default so the browser's menu doesn't open.

Nothing prevented the default of the event dispatched without suppress-contextmenu, so the browser's content area context menu opened.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fba84b6e0b0d https://hg.mozilla.org/integration/autoland/rev/87af77f897b7 Keep the browser's context menu closed after test_panel_list_contextmenu.html dispatches a contextmenu event in the panel, r=reusable-components-reviewers,mkennedy.
Status: ASSIGNED → RESOLVED
Closed: 2 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: