On Fri, 14 Jun 2024 04:44:24 GMT, Ravi Gupta <rgu...@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

Tested on MacOS. The test passes and looks functional. Minor comments.

Have you tried on Windows with different scaling? Looks like the only component 
location you access is for the panel position, which should be safe. I tried 
different scalings on MacOS with no issue. Curious because this was an issue 
with JButton a while before.

test/jdk/java/awt/event/ComponentEvent/ComponentEventTest.java line 66:

> 64:     private volatile static Dimension compSize;
> 65:     private volatile static ArrayList<ComponentEvent> events =
> 66:         new ArrayList<ComponentEvent>();

Suggestion:

    private volatile static ArrayList<ComponentEvent> events =
        new ArrayList<>();

test/jdk/java/awt/event/ComponentEvent/ComponentEventTest.java line 187:

> 185:             for (int j = 0; j < events.size();
> 186:                 System.err.print(events.get(j) + "; "), j++);
> 187:             System.err.println("");

Suggestion:

            System.err.println();

Same for the one on line 202.

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

PR Review: https://git.openjdk.org/jdk/pull/19521#pullrequestreview-2137062290
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1651815703
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1651815934

Reply via email to