зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1690924: Wait for focus event instead of selected children changed r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D104264
This commit is contained in:
Родитель
1380021cac
Коммит
f4a86a8e84
|
@ -74,9 +74,21 @@ addAccessibleTask(
|
|||
"First menu item is selected"
|
||||
);
|
||||
// focus the second item, and verify it is selected
|
||||
event = waitForMacEvent("AXFocusedUIElementChanged");
|
||||
event = waitForMacEvent("AXFocusedUIElementChanged", (iface, data) => {
|
||||
try {
|
||||
return iface.getAttributeValue("AXTitle") == "100%";
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
EventUtils.synthesizeKey("KEY_ArrowDown");
|
||||
await event;
|
||||
|
||||
is(
|
||||
children[0].getAttributeValue("AXSelected"),
|
||||
0,
|
||||
"First menu item is no longer selected"
|
||||
);
|
||||
is(
|
||||
children[1].getAttributeValue("AXSelected"),
|
||||
1,
|
||||
|
|
Загрузка…
Ссылка в новой задаче