OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 |
| 5 <input id="slider" type="range" min=0 max=10 value=0 style="position: absolute;
left: 100px; top: 50px; width: 300px; height: 20px;"> |
| 6 |
| 7 <script> |
| 8 test(function(t) { |
| 9 var axSlider = accessibilityController.accessibleElementById("slider"); |
| 10 assert_equals(axSlider.role, "AXRole: AXSlider"); |
| 11 |
| 12 var axSliderThumb = axSlider.childAtIndex(0); |
| 13 assert_equals(axSliderThumb.role, "AXRole: AXSliderThumb"); |
| 14 |
| 15 // The slider thumb should be near the beginning of the slider |
| 16 assert_true(Math.abs(axSliderThumb.x - axSlider.x) < 5); |
| 17 assert_true(Math.abs(axSliderThumb.y - axSlider.y) < 5); |
| 18 |
| 19 // The slider should be wide but the thumb should not be |
| 20 assert_true(axSlider.width > 250); |
| 21 assert_true(axSliderThumb.width < 30); |
| 22 }, "Test bounds of slider thumb"); |
| 23 </script> |
| 24 |
| 25 </body> |
| 26 </html> |
OLD | NEW |