On Wed, 30 Aug 2023 20:36:45 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Rajat Mahajan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update bug8031573.java >> >> remove macosx from summary . > > test/jdk/javax/swing/JMenuItem/8031573/bug8031573.java line 57: > >> 55: public static final String INSTRUCTIONS = "INSTRUCTIONS:\n\n" >> 56: + "Verify that high resolution system icons are used for >> JCheckBoxMenuItem and JRadioButtonMenuItem on HiDPI displays.\n" >> 57: + "If the display does not support HiDPI mode press PASS.\n" > > We can verify this condition by something like this: > > AffineTransform transform = > GraphicsEnvironment.getLocalGraphicsEnvironment() > > .getDefaultScreenDevice() > > .getDefaultConfiguration() > .getDefaultTransform(); > if (!(transform.getScaleX() > 1.0 && transform.getScaleY() > 1.0)) { > throw new SkippedException("This test is for High DPI displays > only"); > } > > > Then the line can be removed. On the other hand, the second case is > applicable even if the main display isn't a High DPI one. > > What do others think? > > To use `SkippedException`, add the following lines to the tags: > > * @library /test/lib > * @build jtreg.SkippedException > > and import `jtreg.SkippedException`. See > [TaskbarPositionTest.java](https://github.com/openjdk/jdk/blob/master/test/jdk/javax/swing/Popup/TaskbarPositionTest.java) > for an example. @aivanov-jdk I tried it on my High DPI Windows monitor but with scale set to 100% and that threw the skipped exception. I know by default we always have some scale setting on Windows for High DPI Monitors, but do we expect such a scenario? , just making sure before we add this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15441#discussion_r1311013257