summaryrefslogtreecommitdiffstats
path: root/accessible/tests/browser/mac/browser_app.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /accessible/tests/browser/mac/browser_app.js
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/tests/browser/mac/browser_app.js')
-rw-r--r--accessible/tests/browser/mac/browser_app.js38
1 files changed, 36 insertions, 2 deletions
diff --git a/accessible/tests/browser/mac/browser_app.js b/accessible/tests/browser/mac/browser_app.js
index bedefae440..e7e18b5ddd 100644
--- a/accessible/tests/browser/mac/browser_app.js
+++ b/accessible/tests/browser/mac/browser_app.js
@@ -138,7 +138,7 @@ add_task(async () => {
gBrowser,
url: "about:license",
},
- async browser => {
+ async () => {
let root = await getMacAccessible(document);
let rootChildCount = () => root.getAttributeValue("AXChildren").length;
@@ -206,8 +206,10 @@ add_task(async () => {
is(rootChildCount(), baseRootChildCount + 1, "Root has another child");
// Close popup
+ let hide = waitForMacEvent("AXUIElementDestroyed");
EventUtils.synthesizeKey("KEY_Escape");
await BrowserTestUtils.waitForPopupEvent(identityPopup, "hidden");
+ await hide;
// We're back to the base child count
is(rootChildCount(), baseRootChildCount, "Root has the base child count");
@@ -225,7 +227,7 @@ add_task(async () => {
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
url: "http://example.com",
},
- async browser => {
+ async () => {
let input = await getMacAccessible("urlbar-input");
is(
input.getAttributeValue("AXValue"),
@@ -238,6 +240,38 @@ add_task(async () => {
});
/**
+ * Tests attributed text in nav bar has no invisible AXAttachments
+ */
+add_task(async () => {
+ await BrowserTestUtils.withNewTab(
+ {
+ gBrowser,
+ // eslint-disable-next-line @microsoft/sdl/no-insecure-url
+ url: "http://example.com",
+ },
+ async () => {
+ let root = await getMacAccessible(document);
+ let navBar = await getMacAccessible("nav-bar");
+ let elemRange = root.getParameterizedAttributeValue(
+ "AXTextMarkerRangeForUIElement",
+ navBar
+ );
+ let attributedString = root.getParameterizedAttributeValue(
+ "AXAttributedStringForTextMarkerRange",
+ elemRange
+ );
+ let attachmentRoles = attributedString.map(s =>
+ s.AXAttachment ? s.AXAttachment.getAttributeValue("AXRole") : null
+ );
+ ok(
+ !attachmentRoles.includes("AXMenu"),
+ "Collapsed menu should be embedded in attributed text"
+ );
+ }
+ );
+});
+
+/**
* Test context menu
*/
add_task(async () => {