On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S <[email protected]> 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).

I must be missing something but 
[JDK-4659800](https://bugs.openjdk.java.net/browse/JDK-4659800) talks about the 
Enter key, not the Space key: _Hitting enter on focused JButton no longer 
causes action_.

It looks you're testing a completely different thing.

Yes, Space key _always_ activates the focused button. Whether Enter key 
activates focused button is L&F dependent. The test case in JDK-4659800 changes 
the L&F to WindowsLookAndFeel therefore Enter key is expected to cause the 
ActionEvent; if you leave the default MetalLookAndFeel or use 
NimbusLookAndFeel, pressing the Enter key should not send the ActionEvent.

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

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

Reply via email to