Bug 1705240 - Disable accessible/tests/mochitest/events/test_contextmenu.html when native context menus are used. r=Jamie

This test checks accessibility properties of a non-native context menu and sends
synthetic keyboard events to it.
With native context menus, accessibility and keyboard interaction are handled
natively and cannot be tested, so this test can be disabled in that configuration.

Differential Revision: https://phabricator.services.mozilla.com/D112107
This commit is contained in:
Markus Stange 2021-04-16 22:42:45 +00:00
Родитель 1a31db3a4d
Коммит fa3a5ecacc
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -100,8 +100,14 @@
gQueue.invoke(); // Will call SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTests);
const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
if (AppConstants.platform == "macosx" &&
Services.prefs.getBoolPref("widget.macos.native-context-menus", false)) {
ok(true, "Native context menus handle accessibility notifications natively and cannot be tested with synthesized key events.");
} else {
SimpleTest.waitForExplicitFinish();
addA11yLoadEvent(doTests);
}
</script>
</head>