diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /accessible/tests/browser/mac | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/tests/browser/mac')
-rw-r--r-- | accessible/tests/browser/mac/browser_range.js | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/accessible/tests/browser/mac/browser_range.js b/accessible/tests/browser/mac/browser_range.js index 430e41d6ea..8a5bafba50 100644 --- a/accessible/tests/browser/mac/browser_range.js +++ b/accessible/tests/browser/mac/browser_range.js @@ -188,3 +188,57 @@ addAccessibleTask( is(slider.getAttributeValue("AXMaxValue"), 5, "Correct max value"); } ); + +/** + * Verify progress HTML elements expose their min, max, and value to VO. + * Progress elements should not expose a value description, and should not + * expose increment/decrement actions. + */ +addAccessibleTask( + `<progress id="progress" value="70" max="100"></progress>`, + async (browser, accDoc) => { + const progress = getNativeInterface(accDoc, "progress"); + is(progress.getAttributeValue("AXValue"), 70, "Correct value"); + is(progress.getAttributeValue("AXMaxValue"), 100, "Correct max value"); + is(progress.getAttributeValue("AXMinValue"), 0, "Correct min value"); + is( + progress.getAttributeValue("AXValueDescription"), + null, + "Progress elements should not expose a value description" + ); + for (let action of progress.actionNames) { + isnot( + action, + "AXIncrement", + "Progress elements should not expose increment action" + ); + isnot( + action, + "AXDecrement", + "Progress elements should not expose decrement action" + ); + } + } +); + +/** + * Verify progress HTML elements expose changes to their value. + */ +addAccessibleTask( + `<progress id="progress" value="70" max="100"></progress>`, + async (browser, accDoc) => { + const progress = getNativeInterface(accDoc, "progress"); + is(progress.getAttributeValue("AXValue"), 70, "Correct value"); + is(progress.getAttributeValue("AXMaxValue"), 100, "Correct max value"); + is(progress.getAttributeValue("AXMinValue"), 0, "Correct min value"); + + const evt = waitForMacEvent("AXValueChanged"); + await invokeContentTask(browser, [], () => { + const p = content.document.getElementById("progress"); + p.setAttribute("value", "90"); + }); + await evt; + + is(progress.getAttributeValue("AXValue"), 90, "Correct updated value"); + } +); |