/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const actions = menulist.actionNames;
ok(actions.includes("AXPress"), "menu has press action");
let event = waitForMacEvent("AXMenuOpened");
menulist.performAction("AXPress");
await event;
const menu = menulist.getAttributeValue("AXChildren")[0];
ok(menu, "Menulist contains menu"); const children = menu.getAttributeValue("AXChildren");
is(children.length, 4, "Menu has 4 items");
// Menu is open, initial focus should land on the first item
is(
children[0].getAttributeValue("AXSelected"), 1, "First menu item is selected"
); // focus the second item, and verify it is selected
event = waitForMacEvent("AXFocusedUIElementChanged", iface => { try { return iface.getAttributeValue("AXTitle") == "100%";
} catch (e) { returnfalse;
}
});
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, "Second menu item is selected"
); // press the second item, check for selected event
event = waitForMacEvent("AXMenuItemSelected");
children[1].performAction("AXPress");
await event;
},
{ topLevel: false, chrome: true }
);
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-05)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.