RFR: 8333403: Write a test to check various components events are triggered properly [v2]
Tejesh R
tr at openjdk.org
Thu Jun 6 05:31:48 UTC 2024
On Wed, 5 Jun 2024 08:29:11 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: Copyright Header added
test/jdk/java/awt/event/ComponentEvent/ComponentEventTest.java line 54:
> 52: private static Frame frame;
> 53: private static Component[] components;
> 54: private static boolean componentHidden = false;
These boolean variables should be volatile since they are set in Listener.
test/jdk/java/awt/event/ComponentEvent/ComponentEventTest.java line 152:
> 150: currentComponent.setVisible(false);
> 151: frame.invalidate();
> 152: frame.validate();
frame.invalidate();
frame.validate();
Can move these two into separate method and call it since its been used in several places.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1628779521
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1628794155
More information about the client-libs-dev
mailing list