RFR: 8286172: Create an automated test for JDK-4516019

Srinivas Mandalika smandalika at openjdk.java.net
Tue May 17 12:29:56 UTC 2022


On Thu, 5 May 2022 23:55:42 GMT, Phil Race <prr at openjdk.org> wrote:

> Also you are doing the same thing I've told others not to - look at the path name
> 
> test/jdk/javax/swing/4516019/JSpinnerFocusTest.java
> 
> what is the point of 4516019 ? Do NOT create an extra directory for no reason. especially one just numbered for a bugid and in this case this test should go in the pre-existing JSpinner directory !

As suggested:
Test removed from the original location. 
Test added under pre-existing JSpinner directory.

> test/jdk/javax/swing/4516019/JSpinnerFocusTest.java line 29:
> 
>> 27:  * @bug 4516019
>> 28:  * @summary Clicking on the increment/decrement buttons of the spinner
>> 29:  * does not get focus onto the spinner.
> 
> That summary is surely describing the bug, not what the test is verifying.
> 
> Shouldn't it read something like 
> "Verify clicking on inc/dec gives focus to the spinner"

Changed appropriately.

> test/jdk/javax/swing/4516019/JSpinnerFocusTest.java line 81:
> 
>> 79:                     "Clicking on JSpinner buttons did not"
>> 80:                         + " shift foucs to the JSpinner");
>> 81:             }
> 
> foucs -> focus

Done

> test/jdk/javax/swing/4516019/JSpinnerFocusTest.java line 100:
> 
>> 98:             robot.mouseMove(bounds.x + bounds.width/2 ,
>> 99:                 bounds.y + bounds.height /2);
>> 100:             robot.delay(300);
> 
> why not use setAutoDelay(300) and then you don't need all these extra lines of code.

Done

-------------

PR: https://git.openjdk.java.net/jdk/pull/8546



More information about the client-libs-dev mailing list