RFR: 8333403: Write a test to check various components events are triggered properly [v2]
Alisen Chung
achung at openjdk.org
Mon Jun 10 20:12:18 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 134:
> 132:
> 133: EventQueue.invokeAndWait(ComponentEventTest::initializeGUI);
> 134: robot.waitForIdle();
I was notified robot.delay(1000); is more standard here
test/jdk/java/awt/event/ComponentEvent/ComponentEventTest.java line 137:
> 135:
> 136: robot.mouseMove(
> 137: components[0].getLocationOnScreen().x
getLocationOnScreen needs to be accessed on EDT
test/jdk/java/awt/event/ComponentEvent/ComponentEventTest.java line 237:
> 235: }
> 236:
> 237: // Disable the components and do the same set of operations
if you're doing the same operations, you should write a helper function and call that function instead
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1633765852
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1633766751
PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1633769934
More information about the client-libs-dev
mailing list