On Fri, 7 Apr 2023 22:39:54 GMT, lawrence.andrews <[email protected]> wrote:

>> Ravi Gupta has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   8305427: code formatting
>
> test/jdk/java/awt/Focus/RequestFocusOwnerTest/RequestFocusOwnerTest.java line 
> 144:
> 
>> 142:             robot.waitForIdle();
>> 143: 
>> 144:             if (!requestStatus) {
> 
> According to the requestFocusInWindow() documentation 
> https://docs.oracle.com/en/java/javase/20/docs/api/java.desktop/java/awt/Component.html#requestFocusInWindow()
>  . Developers must never assume that this Component is the focus owner until 
> this Component receives a FOCUS_GAINED event.   
> 
> So dn't depend on requestFocusInWindow()  return value

Modified the test to wait until the FOCUS_GAINED event over for the components 
i am expecting for focus to be gained.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13293#discussion_r1172177723

Reply via email to