8340271: Open source several AWT Robot tests#21062
8340271: Open source several AWT Robot tests#21062prsadhuk wants to merge 5 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back psadhukhan! A progress list of the required criteria for merging this PR into |
|
@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: 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
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 |
Webrevs
|
|
|
||
| private static final String INSTRUCTIONS = """ | ||
| 0. DON'T TOUCH ANYTHING! | ||
| 1. This test is for Win32 and Linux only. |
There was a problem hiding this comment.
| 1. This test is for Win32 and Linux only. | |
| 1. This test is for Win and Linux only. |
| Point taAt = ta.getLocationOnScreen(); | ||
| // get bounds of button | ||
| Rectangle bounds = ta.getBounds(); |
There was a problem hiding this comment.
manual test, not needed
| static Robot robot; | ||
| static Dialog dialog; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
| 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); |
There was a problem hiding this comment.
| log("step #"+i); | |
| log("step #" + i); |
| } | ||
|
|
||
| private static void log(String messageIn) { | ||
| messageText.append( messageIn + "\n" ); |
There was a problem hiding this comment.
| 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."""; |
There was a problem hiding this comment.
| 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); |
There was a problem hiding this comment.
| robot.mouseWheel(-1*j); | |
| robot.mouseWheel(-1 * j); |
|
|
||
| public class CreateScreenCapture { | ||
|
|
||
| static Robot robot; |
There was a problem hiding this comment.
robot var also can be moved inside main.
| } | ||
|
|
||
| private static void log(String messageIn) { | ||
| messageText.append( messageIn + "\n"); |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
| 1. This test is for Windown and Linux only. | |
| 1. This test is for Windows and Linux only. |
|
/integrate |
|
Going to push as commit bc36ace.
Your commit was automatically rebased without conflicts. |
Opensource few Robot tests
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21062/head:pull/21062$ git checkout pull/21062Update a local copy of the PR:
$ git checkout pull/21062$ git pull https://git.openjdk.org/jdk.git pull/21062/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 21062View PR using the GUI difftool:
$ git pr show -t 21062Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21062.diff
Webrev
Link to Webrev Comment