<!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>
