Bug 1692110 part 3: Don't run accessibility checks for click events generated by...
commit8197fa684d5e7d7cf345ab56b9b0f43c30d54565
authorJames Teh <jteh@mozilla.com>
Fri, 6 Oct 2023 18:11:30 +0000 (6 18:11 +0000)
committerJames Teh <jteh@mozilla.com>
Fri, 6 Oct 2023 18:11:30 +0000 (6 18:11 +0000)
treeee460cdfee1b4216b4eb4ae19a60bd2d638218c3
parent7648dc6ca0417185a17b8d478494ffa325da8e69
Bug 1692110 part 3: Don't run accessibility checks for click events generated by drag/drop. r=places-reviewers,ayeddi,Gijs,Standard8

Drag/drop generates click events, but these aren't actually a click event intended to activate a control.
Therefore, we don't want to run accessibility checks for the target.
To achieve this, EventUtils.synthesizeDropAfterDragOver instructs AccessibilityUtils to ignore click events while the event is being sent.
This requires that EventUtils has the reference to AccessibilityUtils set by the browser test harness.
As such, some tests had to be adjusted so that they use EventUtils from the browser test scope, rather than loading their own copy of EventUtils.

Differential Revision: https://phabricator.services.mozilla.com/D185776
browser/base/content/test/general/browser_drag.js
browser/base/content/test/general/browser_homeDrop.js
browser/base/content/test/general/browser_newTabDrop.js
browser/base/content/test/general/browser_newWindowDrop.js
browser/base/content/test/general/browser_tabDrop.js
browser/base/content/test/general/browser_tab_drag_drop_perwindow.js
browser/components/customizableui/test/head.js
browser/components/places/tests/browser/browser_toolbar_drop_text.js
testing/mochitest/tests/SimpleTest/AccessibilityUtils.js
testing/mochitest/tests/SimpleTest/EventUtils.js