4 <script src=
"../resources/js-test.js"></script>
6 <button id=
"untitled"></button>
11 aria-valuetext=
"5 of 9"
14 aria-valuenow=
"5">42</div>
16 <div id=
"console"></div>
18 description("This tests that a spin button supports range value attributes.")
20 if (window
.testRunner
&& window
.accessibilityController
) {
21 window
.testRunner
.dumpAsText();
23 function endsWith(str
, suffix
) {
25 return str
.substr(str
.length
- suffix
.length
) == suffix
;
28 var untitled
= document
.getElementById('untitled');
30 window
.axUntitled
= accessibilityController
.focusedElement
;
32 var spin
= document
.getElementById('spin');
34 window
.axSpin
= accessibilityController
.focusedElement
;
36 // Test range value attributes.
37 shouldBe("endsWith(axSpin.intValue, '5')", "true");
38 shouldBe("endsWith(axSpin.minValue, '1')", "true");
39 shouldBe("endsWith(axSpin.maxValue, '9')", "true");
40 shouldBe("endsWith(axSpin.valueDescription, '5 of 9')", "true");
42 // Make sure the title doesn't come from the inner text. It should just be empty if
43 // not otherwise specified.
44 shouldBe("axSpin.deprecatedTitle", "axUntitled.deprecatedTitle");