Allow closing native popups from in-content tests
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
People
(Reporter: bugzilla, Unassigned)
References
Details
Some tests run in-content and synthesize the escape button to close context menus. One reason to do this is because they can't access the chrome-level popup to call hidePopup()
. We should add a method that allows in-content tests to rollup native popups. mstange suggested something in DOMWindowUtils. I confirmed that the affected tests in accessible/tests
can access DOMWindowUtils. I added a function here in the accessible test helper:
function closeContextMenu(aNodeOrID, aCheckerOrEventSeq) {
this.__proto__ = new synthAction(aNodeOrID, aCheckerOrEventSeq);
let DOMWindowUtils = this.DOMNode.ownerGlobal.windowUtils;
}
DOMWindowUtils
is defined.
This would fix at least accessible/tests/mochitest/events/test_focus_contextmenu.xhtml
(here) and accessible/tests/mochitest/events/test_focus_general.html
(here).
Comment 1•4 years ago
|
||
(In reply to Harry Twyford [:harry] from comment #0)
This would fix at least
accessible/tests/mochitest/events/test_focus_contextmenu.xhtml
(here)
This test is disabled on macOS.
and
accessible/tests/mochitest/events/test_focus_general.html
(here).
This test checks other context menu related things that will not work with native context menus, so I think we can disable the relevant parts.
Comment 2•4 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #1)
and
accessible/tests/mochitest/events/test_focus_general.html
(here).This test checks other context menu related things that will not work with native context menus, so I think we can disable the relevant parts.
I've put a patch in bug 1706389.
Comment 3•4 years ago
|
||
This turned out to be unnecessary. Please reopen if a need for this comes up again.
Description
•