OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 |
| 5 <input id="spin" type="number" min=0 max=10 value=0 style="position: absolute; l
eft: 100px; top: 50px; width: 300px; height: 20px;"> |
| 6 |
| 7 <script> |
| 8 test(function(t) { |
| 9 var axSpin = accessibilityController.accessibleElementById("spin"); |
| 10 assert_equals(axSpin.role, "AXRole: AXSpinButton"); |
| 11 |
| 12 var axSpinUp = axSpin.childAtIndex(1).childAtIndex(0); |
| 13 assert_equals(axSpinUp.role, "AXRole: AXButton"); |
| 14 |
| 15 var axSpinDown = axSpin.childAtIndex(1).childAtIndex(1); |
| 16 assert_equals(axSpinDown.role, "AXRole: AXButton"); |
| 17 |
| 18 // The buttons should be near the right edge of the parent. |
| 19 assert_true(Math.abs(axSpinUp.x + axSpinUp.width - (axSpin.x + axSpin.width))
< 5); |
| 20 assert_true(Math.abs(axSpinDown.x + axSpinDown.width - (axSpin.x + axSpin.widt
h)) < 5); |
| 21 |
| 22 // The buttons should be small. |
| 23 assert_true(axSpinUp.width < 30); |
| 24 assert_true(axSpinUp.height < 30); |
| 25 assert_true(axSpinDown.width < 30); |
| 26 assert_true(axSpinDown.height < 30); |
| 27 }, "Test bounds of spin thumb"); |
| 28 </script> |
| 29 |
| 30 </body> |
| 31 </html> |
OLD | NEW |