1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../../resources/js-test-pre.js"></script>
9 <input id="number" type="number"><br>
12 <p id="description"></p>
13 <div id="console"></div>
17 description("This tests that input type='number' exposes the accessibility of it's stepper correctly");
19 if (window.accessibilityController) {
20 window.jsTestIsAsync = true;
22 document.getElementById("number").focus();
23 var textfield = accessibilityController.accessibleElementById("number");
25 // Verify that the click point is the same as the child.
26 shouldBe("textfield.childrenCount", "1");
28 var incrementor = textfield.childAtIndex(0);
30 shouldBe("incrementor.role", "'AXRole: AXIncrementor'");
31 shouldBeTrue("incrementor.width > 0");
32 shouldBeTrue("incrementor.height > 0");
33 shouldBe("incrementor.childrenCount", "2");
35 shouldBe("incrementor.childAtIndex(0).role", "'AXRole: AXButton'");
36 shouldBe("incrementor.childAtIndex(0).subrole", "'AXSubrole: AXIncrementArrow'");
37 shouldBeTrue("incrementor.childAtIndex(0).width > 0");
38 shouldBeTrue("incrementor.childAtIndex(0).height > 0");
39 shouldBeTrue("incrementor.childAtIndex(0).isEnabled");
42 incrementor.childAtIndex(0).press();
43 setTimeout(function() {
44 shouldBe("textfield.stringValue", "'AXValue: 1'");
45 shouldBe("incrementor.childAtIndex(1).role", "'AXRole: AXButton'");
46 shouldBe("incrementor.childAtIndex(1).subrole", "'AXSubrole: AXDecrementArrow'");
47 shouldBeTrue("incrementor.childAtIndex(1).width > 0");
48 shouldBeTrue("incrementor.childAtIndex(1).height > 0");
49 shouldBeTrue("incrementor.childAtIndex(1).isEnabled");
52 incrementor.childAtIndex(1).press();
53 setTimeout(function() {
54 shouldBe("textfield.stringValue", "'AXValue: 0'");
62 <script src="../../resources/js-test-post.js"></script>