RFR: 8341000: Open source some of the AWT Window tests [v3]
Jayathirth D V
jdv at openjdk.org
Thu Oct 3 07:33:17 UTC 2024
On Tue, 1 Oct 2024 09:53:32 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Jayathirth D V has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update based on review comments
>
> test/jdk/java/awt/Window/BadConfigure/BadConfigure.java line 68:
>
>> 66: ch.add("One");
>> 67: f.setSize(200, 200);
>> 68: f.setVisible(true);
>
> usually PassFailJFrame takes care of making frame visible..guess there will be a flashing if done twice, in some platform..
Updated.
> test/jdk/java/awt/Window/InvalidFocusLostEventTest/InvalidFocusLostEventTest.java line 24:
>
>> 22: */
>> 23:
>> 24: /* @test
>
> normally we put @test under /*
Updated.
> test/jdk/java/awt/Window/InvalidFocusLostEventTest/InvalidFocusLostEventTest.java line 47:
>
>> 45: private KeyboardFocusManager fm;
>> 46:
>> 47: static boolean failed = false;
>
> implicit false assignment not needed...
Updated.
> test/jdk/java/awt/Window/InvalidFocusLostEventTest/InvalidFocusLostEventTest.java line 82:
>
>> 80: robot.mouseMove(bp.x + b.getWidth() / 2, bp.y + b.getHeight() / 2 );
>> 81: robot.mousePress(InputEvent.BUTTON1_DOWN_MASK );
>> 82: robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK );
>
> spacing..
Updated.
> test/jdk/java/awt/Window/InvalidFocusLostEventTest/InvalidFocusLostEventTest.java line 93:
>
>> 91: // since focus transfers are asynchronous
>> 92: EventQueue.invokeLater(() -> {
>> 93: if (fm.getFocusOwner() != b) {
>
> Not sure putting invokeLater is ok in the test as it can be executed after test finish..
> Probably we should add a CountDownLatch and countDown here and await in main where we can check for fm.getFocusOwner()
Sure. Updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21281#discussion_r1785756741
PR Review Comment: https://git.openjdk.org/jdk/pull/21281#discussion_r1785757032
PR Review Comment: https://git.openjdk.org/jdk/pull/21281#discussion_r1785759127
PR Review Comment: https://git.openjdk.org/jdk/pull/21281#discussion_r1785757204
PR Review Comment: https://git.openjdk.org/jdk/pull/21281#discussion_r1785757718
More information about the client-libs-dev
mailing list