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:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /accessible/tests/browser/mac/browser_app.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/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 () => {