On Fri, 4 Feb 2022 22:34:47 GMT, lawrence.andrews <[email protected]> wrote:
>> This testcase covers both old and new api ( api added in jdk17
>> getAccessibleAction(), getAccessibleActionCount() ,
>> getAccessibleActionDescription )
>>
>> @shurymury
>> @savoptik
>
> lawrence.andrews has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Added @key headful
test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 2:
> 1: /*
> 2: * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights
> reserved.
Is it a new test or it is based on some old code?
test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 72:
> 70:
> 71: public static void test() {
> 72: AccessibleContext accessibleContext =
> jSlider.getAccessibleContext();
Per the spec you can check that this is an instance of AccessibleJSlider
test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 125:
> 123: throw new RuntimeException("AccessibleStateSet shouldn't
> contain both HORIZONTAL and VERTICAL");
> 124: }
> 125: if (jSlider.getOrientation() != jSlider.HORIZONTAL) {
Shouldn't the test creates a sliders using different orientations?
test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 176:
> 174: }
> 175:
> 176: if
> (!accessibleAction.getAccessibleActionDescription(0).equals("increment")) {
Instead of "string" the AccessibleAction.INCREMENT/DECREMENT constants should
be used.
test/jdk/javax/accessibility/JSlider/JSliderAccessibilityTest.java line 184:
> 182: }
> 183:
> 184: if (accessibleAction.getAccessibleActionDescription(-1) !=
> null) {
I suggest to check 2 as well.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7355