jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8327924: Simplify TrayIconScalingTest.java

Open aivanov-jdk opened this issue 1 year ago • 7 comments

This is to simplify TrayIconScalingTest.java.

  1. Rename createAndShowGUI to createAndShowTrayIcon which is more specific.
  2. Move creating tray icon to the top.
  3. Streamline PassFailJFrame with the chained calls, including awaitAndCheck.
  4. Ensure tray is not null before removing the icon.
  5. Pass AWTException as the cause in the wrapped exception.

Previously, before the builder pattern was introduced, PassFailJFrame.positionTestWindow had had to be called to show the instructions UI. It's not required any more. Additionally, it has the effect of moving the instruction frame to the left, which doesn't look good and sometimes results in positioning the instructions outside of the screen bounds if the screen resolution is low.

With the builder pattern, the call to the build method shows all the registered windows on the screen, including the instruction frame. Since there's no secondary UI, the instructions remain in the centre of the screen.


Progress

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

Issue

  • JDK-8327924: Simplify TrayIconScalingTest.java (Bug - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18224

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

Using diff file

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

Webrev

Link to Webrev Comment

aivanov-jdk avatar Mar 12 '24 08:03 aivanov-jdk

:wave: Welcome back aivanov! A progress list of the required criteria for merging this PR into pr/18206 will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

bridgekeeper[bot] avatar Mar 12 '24 08:03 bridgekeeper[bot]

@aivanov-jdk 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[bot] avatar Mar 12 '24 08:03 openjdk[bot]

Webrevs

mlbridge[bot] avatar Mar 12 '24 08:03 mlbridge[bot]

@honkar-jdk, could you, as the author of the test, take a look, please?

aivanov-jdk avatar Mar 12 '24 14:03 aivanov-jdk

@aivanov-jdk 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:

8327924: Simplify TrayIconScalingTest.java

Reviewed-by: honkar, prr

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 50 new commits pushed to the master branch:

  • c342188fd978dd94e7788fb0fb0345fd8c0eaa9a: 8328074: Add jcheck whitespace checking for assembly files
  • 3c70f26b2f3fa9bc143e2506af30f9b1daf20022: 8328112: Remove CardTable::_guard_region
  • 48717d63cc58f693f0917e61eafd672cd6af02ed: 8326333: jshell <TAB> completion on arrays is incomplete
  • ece4124f25f676da9bf2d1b7fd8e4394dd7d31af: 8328247: Remove redundant dir for tests converted from applet to main
  • d32ce65781c1d7815a69ceac720cdf3ae39caa9e: 8327651: Rename DictionaryEntry members related to protection domain
  • 07194195cefc568048fa639b6f8534ce3718c8d2: 8328236: module_entry in CDS map file has stale value
  • 0204aacb0305e94a7d6d5299a5ae835f3f71b030: 8328115: Convert java/awt/font/TextLayout/TestJustification.html applet test to main
  • 9bc1b065db238b7c9d0562f9bd55d2f338c6ff3d: 8328242: Add a log area to the PassFailJFrame
  • 65a84c2642822862fa186f290f8d6e83537bea06: 8328006: refactor large anonymous inner class in HtmlDocletWriter
  • 044f4ed55dfce7f1aed9e10accf459b4af9b975e: 8326979: (jdeps) improve the error message for FindException caused by InvalidModuleDescriptorException
  • ... and 40 more: https://git.openjdk.org/jdk/compare/3b9255eb663b4c90aa5cec89f0d9380ef8eba49e...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[bot] avatar Mar 13 '24 20:03 openjdk[bot]

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout 8327924-simpify-TrayIconScalingTest.java
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

openjdk-notifier[bot] avatar Mar 14 '24 11:03 openjdk-notifier[bot]

@aivanov-jdk this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout 8327924-simpify-TrayIconScalingTest.java
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

openjdk[bot] avatar Mar 14 '24 11:03 openjdk[bot]

/integrate

aivanov-jdk avatar Mar 21 '24 16:03 aivanov-jdk

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

  • 16ed191329b517766313761c8f3450b4a8285658: 8328101: Parallel: Obsolete ParallelOldDeadWoodLimiterMean and ParallelOldDeadWoodLimiterStdDev
  • 581b1e29aebd425bade14d2ee46704a16187df5b: 8328402: Implement pausing functionality for the PassFailJFrame
  • 75195aab497a2d23548128e03f6887283dcaa7e1: 8328299: Convert DnDFileGroupDescriptor.html applet test to main
  • 725d87bbc2abae2ca856d91668f0a494f93fca1c: 8328570: Convert closed JViewport manual applet tests to main
  • e41bc42deb22615c9b93ee639d04e9ed2bd57f64: 8327990: [macosx-aarch64] Various tests fail with -XX:+AssertWXAtThreadSync
  • 43080173e88c8f53cd54c9096c79f3144007fd97: 8328631: Convert java/awt/InputMethods/InputMethodsTest/InputMethodsTest.java applet test to manual
  • 700d2b91defd421a2818f53830c24f70d11ba4f6: 8328401: Convert java/awt/Frame/InitialMaximizedTest/InitialMaximizedTest.html applet test to automated
  • bb3e84bd1fd8217fcb319de8a0716e44359e3423: 8328592: hprof tests fail with -XX:-CompactStrings
  • ac2f8e5af8c88cd13038b113f82bb7c17a38aa40: 8327994: Update code gen in CallGeneratorHelper
  • c434b79cff33e08e4518e92ddddae996dffefe29: 8327169: serviceability/dcmd/vm/SystemMapTest.java and SystemDumpMapTest.java may fail after JDK-8326586
  • ... and 109 more: https://git.openjdk.org/jdk/compare/3b9255eb663b4c90aa5cec89f0d9380ef8eba49e...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar Mar 21 '24 16:03 openjdk[bot]

@aivanov-jdk Pushed as commit 1496b5de9004c6a9e43ead5f6e9e88362028a7cc.

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

openjdk[bot] avatar Mar 21 '24 16:03 openjdk[bot]