RFR: 8339836: Open source several AWT Mouse tests - Batch 1 [v2]

Harshitha Onkar honkar at openjdk.org
Tue Sep 24 18:54:37 UTC 2024


On Tue, 24 Sep 2024 06:07:19 GMT, Tejesh R <tr at openjdk.org> wrote:

>> Open source these AWT Mouse tests:
>> 
>> java/awt/Mouse/MouseEnterExitTest.java
>> java/awt/Mouse/MouseEnterExitTest2.java
>> java/awt/Mouse/MousePressedTest.java
>> java/awt/Mouse/MouseEnterExitTest4.java
>> java/awt/Mouse/MouseEnterExitTest3.java
>
> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
> 
>   MouseEnterExitTest converted to automated

LGTM other than few inline suggestions

test/jdk/java/awt/Mouse/MouseEnterExitTest.java line 111:

> 109: 
> 110: public class MouseEnterExitTest {
> 111:     static MouseFrame TestFrame;

naming convention

Suggestion:

    static MouseFrame testFrame;

test/jdk/java/awt/Mouse/MouseEnterExitTest.java line 128:

> 126:                     TestFrame.getLocationOnScreen().y + TestFrame.getSize().height / 2));
> 127:             robot.delay(100);
> 128:             robot.waitForIdle();

Ideally waitForIdle() is called first then followed by delay.

Suggestion:

            robot.waitForIdle();
            robot.delay(100);

test/jdk/java/awt/Mouse/MouseEnterExitTest3.java line 45:

> 43:      final static Button button = new Button("Button");
> 44:      final static JButton jbutton = new JButton("JButton");
> 45:      final static Frame frame = new Frame("Mouse Enter/Exit Test");

Modifier order, same for the other two

Suggestion:

     static final Button button = new Button("Button");

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

Marked as reviewed by honkar (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21124#pullrequestreview-2326065123
PR Review Comment: https://git.openjdk.org/jdk/pull/21124#discussion_r1773835727
PR Review Comment: https://git.openjdk.org/jdk/pull/21124#discussion_r1773834527
PR Review Comment: https://git.openjdk.org/jdk/pull/21124#discussion_r1773840125


More information about the client-libs-dev mailing list