RFR: 8333403: Write a test to check various components events are triggered properly [v6]

Ravi Gupta rgupta at openjdk.org
Tue Sep 17 16:25:19 UTC 2024


On Wed, 4 Sep 2024 15:54:16 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Here we expect events should not triggered.
>> 
>> When inconify i expect all events should not triggered , but when form Frame.ICONIFIED to Frame.NORMAL componentMoved and componentResized events are triggered , Events order on Windows and Mac are different.
>> 
>> Order of the events for Frame from Frame.ICONIFIED to Frame.NORMAL
>> 
>> On Windows
>> 
>> Component Shown 
>> Frame is Visible with ExtendedState as ICONIFIED
>> Component Moved
>> Component Resized
>> Frame is Visible with ExtendedState as NORMAL
>> 
>> On MAC
>> Component Moved
>> Component Resized
>> Component Shown 
>> Frame is Visible with ExtendedState as ICONIFIED
>> Frame is Visible with ExtendedState as NORMAL
>
>> when form Frame.ICONIFIED to Frame.NORMAL componentMoved and componentResized events are triggered
> 
> Then verify that these events are triggered:
> 
> 
> -        if (componentShown || componentHidden) {
> +        if (componentShown || componentHidden || !componentMoved
> +            || !componentResized) {
> 
> Otherwise it looks as if you forgot to test something. You may have two `if` statements to print more precise error message.

We observed different behavior between MS Windows and other OS ,we natively received WM_SIZE/WM_MOVE events when set frame iconify to
deiconify , The AWT sends the events to components when it receives the events from the native system. 

Now we are applying the OS specific check to test this scenario.

Please check the details at  JDK-6754618

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1763534174


More information about the client-libs-dev mailing list