RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800

Alexey Ivanov aivanov at openjdk.java.net
Thu Feb 3 15:32:05 UTC 2022


On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S <mvs at openjdk.org> wrote:

> Write a regression test for JDK-4659800.
> This test checks whether typing 'Space' key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms.
> This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30).

Please take into account all the comments in #7278 as well as my comment about Enter vs Space.

test/jdk/javax/swing/JButton/4659800/bug4659800.java line 123:

> 121:             button1.requestFocusInWindow();
> 122:             Point p = button1.getLocationOnScreen();
> 123:             robot.mouseMove(p.x + button1.getWidth() / 2, p.y + button1.getHeight() / 2);

I don't understand why you need to programmatically press the `dummyButton` and then move the mouse cursor to `button1`.

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

Changes requested by aivanov (Reviewer).

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



More information about the client-libs-dev mailing list