On Mon, 18 Mar 2024 17:31:07 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:
> Convert java/awt/image/multiresolution/MultiDisplayTest/MultiDisplayTest.java > applet test to main using PassFailJFrame test/jdk/java/awt/image/multiresolution/MultiDisplayTest.java line 33: > 31: * on HiDPI + non-HiDPI display pair. > 32: * @run main MultiDisplayTest > 33: */ We usually move this block just before a class declaration, for better readability. test/jdk/java/awt/image/multiresolution/MultiDisplayTest.java line 58: > 56: """ > 57: This test is for OS X or Windows only. > 58: For other OSes please simply push "Pass". `please simply push "Pass"` usually means that it can be replaced with `PassFailJFrame.forcePass()`, but in this case the `@requires (os.family...` can be used to avoid running the test on unwanted platforms. test/jdk/java/awt/image/multiresolution/MultiDisplayTest.java line 93: > 91: generateImage(1, Color.BLACK), generateImage(2, Color.BLUE)}); > 92: > 93: public static void main(String[] args) throws Exception { While the `@requires (os.family...` should be enough, we can add something like if (!checkOS()) { throw new SkippedException("..."); //jtreg.SkippedException } test/jdk/java/awt/image/multiresolution/MultiDisplayTest.java line 109: > 107: frame.setLayout(new BorderLayout()); > 108: Button b = new Button("Start"); > 109: b.setEnabled(checkOS()); With the changes mentioned above, this will become obsolete. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18354#discussion_r1533996928 PR Review Comment: https://git.openjdk.org/jdk/pull/18354#discussion_r1533994910 PR Review Comment: https://git.openjdk.org/jdk/pull/18354#discussion_r1534013542 PR Review Comment: https://git.openjdk.org/jdk/pull/18354#discussion_r1534012450