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

Alexey Ivanov aivanov at openjdk.org
Fri Sep 20 17:51:39 UTC 2024


On Wed, 18 Sep 2024 15:34:02 GMT, Ravi Gupta <rgupta at openjdk.org> wrote:

>> This testcase checks for the following assertions for Component events:
>> 
>> 1. When components are resized, moved, hidden and shown the respective events are triggered.
>> 2. When the components are hidden/disabled also,the component events like resized/moved are triggered.
>> 3. When a hidden component is hidden again, or a visible component is shown again, the events should not be fired.
>> 4. When a window is minimized/restored then hidden and shown component events should be triggered.
>> 
>> Testing:
>> Tested using Mach5(20 times per platform) in macos,linux and windows and got all pass.
>
> Ravi Gupta has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8333403: Review Comments Fixed

Looks good to me except for minor nits.

test/jdk/java/awt/Component/ComponentEventTest.java line 44:

> 42: import java.awt.event.InputEvent;
> 43: import java.lang.reflect.InvocationTargetException;
> 44: import jdk.test.lib.Platform;

Suggestion:

import java.lang.reflect.InvocationTargetException;

import jdk.test.lib.Platform;


You should put a blank line to separate standard library imports from custom (internal) classes.

test/jdk/java/awt/Component/ComponentEventTest.java line 167:

> 165:         System.out.println("Iconify frame");
> 166:         resetValues();
> 167:         iconifyFrame();

`testIconifyFrame`?

test/jdk/java/awt/Component/ComponentEventTest.java line 171:

> 169:         System.out.println("Deiconify frame");
> 170:         resetValues();
> 171:         deiconifyFrame();

`testDeiconifyFrame`?

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

Changes requested by aivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19521#pullrequestreview-2318886438
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1768976680
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1768980677
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1768980977


More information about the client-libs-dev mailing list