On Wed, 30 Aug 2023 18:21:11 GMT, Rajat Mahajan <[email protected]> wrote:
>> I have made the test changes to include radio button in menu and tested the
>> same and it works fine.
>
> 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 56:
> 54:
> 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"
Suggestion:
+ "Verify that high resolution system icons are used for\n"
+ "JCheckBoxMenuItem and JRadioButtonMenuItem on HiDPI displays.\n"
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.
test/jdk/javax/swing/JMenuItem/8031573/bug8031573.java line 63:
> 61: + "4. Check that the icon on the JRadioButtonMenuItem is
> smooth.\n"
> 62: + "5. Test the markers are still crisp after changing the
> scale in Windows settings.\n"
> 63: + " This could be done on same monitor by changing scale or
> multi-monitor setup with different scales.\n"
Suggestion:
+ " This could be done on same monitor by changing scale or
multi-monitor setup\n"
+ " with different scales.\n"
Wrapping long lines makes the instruction window more compact, which, in its
turn, makes them easier to read.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15441#discussion_r1310786596
PR Review Comment: https://git.openjdk.org/jdk/pull/15441#discussion_r1310793135
PR Review Comment: https://git.openjdk.org/jdk/pull/15441#discussion_r1310787678