RFR: 8340271: Open source several AWT Robot tests [v2]

Abhishek Kumar abhiscxk at openjdk.org
Thu Sep 19 05:39:40 UTC 2024


On Thu, 19 Sep 2024 04:00:30 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Opensource few Robot tests
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   minor review

test/jdk/java/awt/Robot/CreateScreenCapture.java line 44:

> 42: 
> 43:     static Robot robot;
> 44:     static Dialog dialog;

may be declared as local variable.

test/jdk/java/awt/Robot/CreateScreenCapture.java line 62:

> 60:         PassFailJFrame passFail = new PassFailJFrame(INSTRUCTIONS);
> 61:         dialog = new Dialog(new Frame(), "Instructions");
> 62:         messageText = new TextArea( "", 5, 80, TextArea.SCROLLBARS_BOTH);

Suggestion:

        messageText = new TextArea("", 5, 80, TextArea.SCROLLBARS_BOTH);

test/jdk/java/awt/Robot/CreateScreenCapture.java line 74:

> 72:             image = null;
> 73:             robot.delay(200);
> 74:             log("step #"+i);

Suggestion:

            log("step #" + i);

test/jdk/java/awt/Robot/CreateScreenCapture.java line 80:

> 78: 
> 79:     private static void log(String messageIn) {
> 80:         messageText.append( messageIn + "\n" );

Suggestion:

        messageText.append(messageIn + "\n");

test/jdk/java/awt/Robot/RobotScrollTest.java line 51:

> 49:          3. Once the pointer is on the text area, the Robot will use the mouse wheel
> 50:             to scroll the text.
> 51:             If the text scrolled, hit PASS, else, hit fail.""";

Suggestion:

            If the text scrolled, hit PASS, else, hit FAIL.""";

test/jdk/java/awt/Robot/RobotScrollTest.java line 95:

> 93: 
> 94:             for (int k = 0; k < 5; k++) {
> 95:                 robot.mouseWheel(-1*j);

Suggestion:

                robot.mouseWheel(-1 * j);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21062#discussion_r1766182287
PR Review Comment: https://git.openjdk.org/jdk/pull/21062#discussion_r1766183229
PR Review Comment: https://git.openjdk.org/jdk/pull/21062#discussion_r1766184151
PR Review Comment: https://git.openjdk.org/jdk/pull/21062#discussion_r1766184379
PR Review Comment: https://git.openjdk.org/jdk/pull/21062#discussion_r1766185467
PR Review Comment: https://git.openjdk.org/jdk/pull/21062#discussion_r1766186486


More information about the client-libs-dev mailing list