Skip to content

8340271: Open source several AWT Robot tests#21062

Closed
prsadhuk wants to merge 5 commits intoopenjdk:masterfrom
prsadhuk:JDK-8340271
Closed

8340271: Open source several AWT Robot tests#21062
prsadhuk wants to merge 5 commits intoopenjdk:masterfrom
prsadhuk:JDK-8340271

Conversation

@prsadhuk
Copy link
Contributor

@prsadhuk prsadhuk commented Sep 18, 2024

Opensource few Robot tests


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8340271: Open source several AWT Robot tests (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21062/head:pull/21062
$ git checkout pull/21062

Update a local copy of the PR:
$ git checkout pull/21062
$ git pull https://git.openjdk.org/jdk.git pull/21062/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21062

View PR using the GUI difftool:
$ git pr show -t 21062

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21062.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 18, 2024

👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 18, 2024

@prsadhuk This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8340271: Open source several AWT Robot tests

Reviewed-by: abhiscxk, honkar

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 70 new commits pushed to the master branch:

  • 2ada313: 8340329: (fs) Message of NotLinkException thrown by FIles.readSymbolicLink does not include file name (win)
  • 3bb8de3: 8338693: assert(Atomic::add(&ik->_shared_class_load_count, 1) == 1) failed: shared class loaded more than once
  • d555f07: 8298614: Support CDS heap dumping for SerialGC and ParallelGC
  • c9bee17: 8331391: Enhance the keytool code by invoking the buildTrustedCerts method for essential options
  • 7579d37: 8338995: New Object to ObjectMonitor mapping: PPC64 implementation
  • cecb0b3: 8339787: Add some additional diagnostic output to java/net/ipv6tests/UdpTest.java
  • 0120d3e: 8340306: Add border around instructions in PassFailJFrame
  • 2faf8b8: 8340007: Refactor KeyEvent/FunctionKeyTest.java
  • 8908812: 8337674: ZGC: Consistent style for naming private static constants
  • 118c9ad: 8338759: Add extra diagnostic to java/net/InetAddress/ptr/Lookup.java
  • ... and 60 more: https://git.openjdk.org/jdk/compare/a0794e0a054c5e7ed051efa6362726cdd7598255...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 18, 2024
@openjdk
Copy link

openjdk bot commented Sep 18, 2024

@prsadhuk The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Sep 18, 2024
@mlbridge
Copy link

mlbridge bot commented Sep 18, 2024

Webrevs


private static final String INSTRUCTIONS = """
0. DON'T TOUCH ANYTHING!
1. This test is for Win32 and Linux only.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. This test is for Win32 and Linux only.
1. This test is for Win and Linux only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines +80 to +82
Point taAt = ta.getLocationOnScreen();
// get bounds of button
Rectangle bounds = ta.getBounds();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should they be in EDT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manual test, not needed

Comment on lines +43 to +44
static Robot robot;
static Dialog dialog;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be declared as local variable.

robot = new Robot();
PassFailJFrame passFail = new PassFailJFrame(INSTRUCTIONS);
dialog = new Dialog(new Frame(), "Instructions");
messageText = new TextArea( "", 5, 80, TextArea.SCROLLBARS_BOTH);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

image.flush();
image = null;
robot.delay(200);
log("step #"+i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log("step #"+i);
log("step #" + i);

}

private static void log(String messageIn) {
messageText.append( messageIn + "\n" );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

2. Just sit back, and watch the Robot move the mouse to the TextArea.
3. Once the pointer is on the text area, the Robot will use the mouse wheel
to scroll the text.
If the text scrolled, hit PASS, else, hit fail.""";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

}

for (int k = 0; k < 5; k++) {
robot.mouseWheel(-1*j);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
robot.mouseWheel(-1*j);
robot.mouseWheel(-1 * j);


public class CreateScreenCapture {

static Robot robot;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robot var also can be moved inside main.

}

private static void log(String messageIn) {
messageText.append( messageIn + "\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


private static final String INSTRUCTIONS = """
0. DON'T TOUCH ANYTHING!
1. This test is for Windown and Linux only.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. This test is for Windown and Linux only.
1. This test is for Windows and Linux only.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 19, 2024
@prsadhuk
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 19, 2024

Going to push as commit bc36ace.
Since your change was applied there have been 71 commits pushed to the master branch:

  • 5f3e7aa: 8339735: Remove references to Applet in core-libs/security APIs
  • 2ada313: 8340329: (fs) Message of NotLinkException thrown by FIles.readSymbolicLink does not include file name (win)
  • 3bb8de3: 8338693: assert(Atomic::add(&ik->_shared_class_load_count, 1) == 1) failed: shared class loaded more than once
  • d555f07: 8298614: Support CDS heap dumping for SerialGC and ParallelGC
  • c9bee17: 8331391: Enhance the keytool code by invoking the buildTrustedCerts method for essential options
  • 7579d37: 8338995: New Object to ObjectMonitor mapping: PPC64 implementation
  • cecb0b3: 8339787: Add some additional diagnostic output to java/net/ipv6tests/UdpTest.java
  • 0120d3e: 8340306: Add border around instructions in PassFailJFrame
  • 2faf8b8: 8340007: Refactor KeyEvent/FunctionKeyTest.java
  • 8908812: 8337674: ZGC: Consistent style for naming private static constants
  • ... and 61 more: https://git.openjdk.org/jdk/compare/a0794e0a054c5e7ed051efa6362726cdd7598255...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 19, 2024
@openjdk openjdk bot closed this Sep 19, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 19, 2024
@prsadhuk prsadhuk deleted the JDK-8340271 branch September 19, 2024 16:22
@openjdk
Copy link

openjdk bot commented Sep 19, 2024

@prsadhuk Pushed as commit bc36ace.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants