blob: 71cedfce9210b1a241f55ebc7ee53bbb484fa4c0 [file] [log] [blame]
825
** Test slider accessibility attributes
RUN(sliderAXObject = accessibilityController.focusedElement)
EXPECTED (sliderAXObject.minValue == '0') OK
EXPECTED (sliderAXObject.maxValue == '100') OK
EXPECTED (sliderAXObject.childrenCount == '1') OK
EXPECTED (sliderAXObject.role == 'AXRole: AXSlider') OK
** Test thumb accessibility attributes
RUN(thumbAXObject = sliderAXObject.childAtIndex(0))
EXPECTED (thumbAXObject.childrenCount == '0') OK
thumbAXObject.role = AXRole: AXValueIndicator
EXPECTED (thumbAXObject.role == 'AXRole: AXValueIndicator') OK
** Increment the slider, test slider value and div set on 'update' event
RUN(sliderAXObject.increment())
EXPECTED (sliderInput.value == '55') OK
EXPECTED (valueDiv.innerText == '55') OK
** Decrement the slider, test slider value and div set on 'update' event
RUN(sliderInput.value = 22)
RUN(sliderAXObject.decrement())
EXPECTED (sliderInput.value == '17') OK
EXPECTED (valueDiv.innerText == '17') OK
** Change slider range
RUN(sliderInput.setAttribute('max', 1000))
RUN(sliderInput.setAttribute('min', 500))
EXPECTED (sliderAXObject.minValue == '500') OK
EXPECTED (sliderAXObject.maxValue == '1000') OK
** Re-test incrementing the slider
RUN(sliderInput.value = 600)
RUN(sliderAXObject.increment())
EXPECTED (sliderInput.value == '625') OK
EXPECTED (valueDiv.innerText == '625') OK
** Re-test decrementing the slider
RUN(sliderInput.value = 850)
RUN(sliderAXObject.decrement())
EXPECTED (sliderInput.value == '825') OK
EXPECTED (valueDiv.innerText == '825') OK