| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../../fast/js/resources/js-test-pre.js"></script> |
| </head> |
| <body id="body"> |
| |
| <form> |
| <input id="number" type="number"><br> |
| </form> |
| |
| <p id="description"></p> |
| <div id="console"></div> |
| |
| <script> |
| |
| description("This tests that input type='number' exposes the accessibility of it's stepper correctly"); |
| |
| if (window.accessibilityController) { |
| |
| document.getElementById("number").focus(); |
| var textfield = accessibilityController.focusedElement; |
| |
| // Verify that the click point is the same as the child. |
| shouldBe("textfield.childrenCount", "1"); |
| |
| var incrementor = textfield.childAtIndex(0); |
| |
| shouldBe("incrementor.role", "'AXRole: AXIncrementor'"); |
| shouldBeTrue("incrementor.width > 0"); |
| shouldBeTrue("incrementor.height > 0"); |
| shouldBe("incrementor.childrenCount", "2"); |
| |
| shouldBe("incrementor.childAtIndex(0).role", "'AXRole: AXButton'"); |
| shouldBe("incrementor.childAtIndex(0).subrole", "'AXSubrole: AXIncrementArrow'"); |
| shouldBeTrue("incrementor.childAtIndex(0).width > 0"); |
| shouldBeTrue("incrementor.childAtIndex(0).height > 0"); |
| |
| // Increment. |
| incrementor.childAtIndex(0).press(); |
| shouldBe("textfield.stringValue", "'AXValue: 1'"); |
| |
| shouldBe("incrementor.childAtIndex(1).role", "'AXRole: AXButton'"); |
| shouldBe("incrementor.childAtIndex(1).subrole", "'AXSubrole: AXDecrementArrow'"); |
| shouldBeTrue("incrementor.childAtIndex(1).width > 0"); |
| shouldBeTrue("incrementor.childAtIndex(1).height > 0"); |
| |
| // Decrement. |
| incrementor.childAtIndex(1).press(); |
| shouldBe("textfield.stringValue", "'AXValue: 0'"); |
| } |
| |
| </script> |
| |
| <script src="../../../fast/js/resources/js-test-post.js"></script> |
| </body> |
| </html> |