diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /accessible/tests/browser/mac/browser_range.js | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/tests/browser/mac/browser_range.js')
-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"); + } +); |