summaryrefslogtreecommitdiffstats
path: root/accessible/tests/mochitest/value/test_ariavalue.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--accessible/tests/mochitest/value/test_ariavalue.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/accessible/tests/mochitest/value/test_ariavalue.html b/accessible/tests/mochitest/value/test_ariavalue.html
new file mode 100644
index 0000000000..bdb62a866d
--- /dev/null
+++ b/accessible/tests/mochitest/value/test_ariavalue.html
@@ -0,0 +1,85 @@
+<html>
+
+<head>
+ <title>nsIAccessible value testing for implicit aria-value* attributes</title>
+
+ <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+
+ <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+
+ <script type="application/javascript" src="../common.js"></script>
+ <script type="application/javascript" src="../value.js"></script>
+
+ <script src="chrome://mochikit/content/chrome-harness.js"></script>
+
+ <script type="application/javascript">
+ function doTest() {
+ for (const role of ["slider", "scrollbar"]) {
+ testValue(`${role}_default`, "50", 50, 0, 100, 0);
+ testValue(`${role}_min1max50`, "25.5", 25.5, 1, 50, 0);
+ testValue(`${role}_max200`, "100", 100, 0, 200, 0);
+ testValue(`${role}_min10`, "55", 55, 10, 100, 0);
+ testValue(`${role}_vt`, "juice", 50, 0, 100, 0);
+ testValue(`${role}_vn`, "6", 6, 0, 100, 0);
+ testValue(`${role}_vtvn`, "juice", 6, 0, 100, 0);
+ }
+
+ testValue("spinbutton_default", "", 0, 0, 0, 0);
+ testValue("spinbutton_min1max50", "", 0, 1, 50, 0);
+ testValue("spinbutton_max200", "", 0, 0, 200, 0);
+ testValue("spinbutton_min10", "", 0, 10, 0, 0);
+ testValue("spinbutton_vt", "juice", 0, 0, 0, 0);
+ testValue("spinbutton_vn", "6", 6, 0, 0, 0);
+ testValue("spinbutton_vtvn", "juice", 6, 0, 0, 0);
+
+ SimpleTest.finish();
+ }
+
+ SimpleTest.waitForExplicitFinish();
+ addA11yLoadEvent(doTest);
+ </script>
+
+</head>
+
+<body>
+
+ <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1357071"
+ title="Add support for implicit values for aria-value* attributes for scrollbar and slider roles">
+ Bug 1357071
+ </a>
+
+ <p id="display"></p>
+ <div id="content" style="display: none">
+ </div>
+ <pre id="test">
+ </pre>
+
+ <!-- ARIA sliders -->
+ <div id="slider_default" role="slider">vanilla slider</div>
+ <div id="slider_min1max50" role="slider" aria-valuemin="1" aria-valuemax="50">banana slider</div>
+ <div id="slider_max200" role="slider" aria-valuemax="200">cherry slider</div>
+ <div id="slider_min10" role="slider" aria-valuemin="10">strawberry slider</div>
+ <div id="slider_vt" role="slider" aria-valuetext="juice">orange slider</div>
+ <div id="slider_vn" role="slider" aria-valuenow="6">chocolate slider</div>
+ <div id="slider_vtvn" role="slider" aria-valuetext="juice" aria-valuenow="6">apple slider</div>
+
+ <!-- ARIA scrollbars -->
+ <div id="scrollbar_default" role="scrollbar">vanilla scrollbar</div>
+ <div id="scrollbar_min1max50" role="scrollbar" aria-valuemin="1" aria-valuemax="50">banana scrollbar</div>
+ <div id="scrollbar_max200" role="scrollbar" aria-valuemax="200">cherry scrollbar</div>
+ <div id="scrollbar_min10" role="scrollbar" aria-valuemin="10">strawberry scrollbar</div>
+ <div id="scrollbar_vt" role="scrollbar" aria-valuetext="juice">orange scrollbar</div>
+ <div id="scrollbar_vn" role="scrollbar" aria-valuenow="6">chocolate scrollbar</div>
+ <div id="scrollbar_vtvn" role="scrollbar" aria-valuetext="juice" aria-valuenow="6">apple scrollbar</div>
+
+ <!-- ARIA spinbuttons -->
+ <div id="spinbutton_default" role="spinbutton">vanilla spinbutton</div>
+ <div id="spinbutton_min1max50" role="spinbutton" aria-valuemin="1" aria-valuemax="50">banana spinbutton</div>
+ <div id="spinbutton_max200" role="spinbutton" aria-valuemax="200">cherry spinbutton</div>
+ <div id="spinbutton_min10" role="spinbutton" aria-valuemin="10">strawberry spinbutton</div>
+ <div id="spinbutton_vt" role="spinbutton" aria-valuetext="juice">orange spinbutton</div>
+ <div id="spinbutton_vn" role="spinbutton" aria-valuenow="6">chocolate spinbutton</div>
+ <div id="spinbutton_vtvn" role="spinbutton" aria-valuetext="juice" aria-valuenow="6">apple spinbutton</div>
+</body>
+
+</html>