On Wed, 16 Feb 2022 22:50:50 GMT, Phil Race <p...@openjdk.org> wrote:

>> Manukumar V S has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fixed review comments: waitForIdle() added after frame creation and waits 
>> until button gains focus
>
> test/jdk/javax/swing/JButton/SpaceKeyActivatesButton.java line 39:
> 
>> 37: 
>> 38: /*
>> 39:  * @test
> 
> @bug ?
> 
> And I presume you've verified this using mach 5?
> 
> Also do we actually specify that Space generates an ActionEvent on a Button ?
> I'm wondering what is the motivation for this test.

I couldn't find any bug associated with this, that's why @bug label was not 
given. I had created a test for 
[JDK-4659800](https://bugs.openjdk.java.net/browse/JDK-4659800) -> 
https://git.openjdk.java.net/jdk/pull/7296 which verifies the action of 'Enter' 
key on focused button, but it was applicable for Windows platform(Windows and 
Windows Classic LnFs) only. So just thought of creating a test which is 
applicable for all platforms and in all LnFs. This doc 
https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/event/ActionEvent.html
 says that "To invoke an ActionEvent on a Button using the keyboard, use the 
Space bar", so I created a general test which checks this fact as I couldn't 
find any existing test related to this use case.
This is well tested using mach5 and the link is attached in the bug.

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

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

Reply via email to