RFR: 8327826: Convert javax/swing/border/Test4243289.java applet test to main
Alexey Ivanov
aivanov at openjdk.org
Mon Mar 11 21:39:13 UTC 2024
On Mon, 11 Mar 2024 14:46:11 GMT, Tejesh R <tr at openjdk.org> wrote:
> Convert javax/swing/border/Test4243289.java applet test to main based test using PassFailJFrame.
Changes requested by aivanov (Reviewer).
test/jdk/javax/swing/border/Test4243289.java line 47:
> 45: When frame starts, you'll see a panel with a TitledBorder
> 46: with title "Panel Title". If this title is overstriken with
> 47: the border line, test fails, otherwise it passes.
As in #18189, just explain what the tester needs to do. Both the instructions and the test UI appear on the screen simultaneously.
test/jdk/javax/swing/border/Test4243289.java line 49:
> 47: the border line, test fails, otherwise it passes.
> 48: """;
> 49: PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()
Suggestion:
PassFailJFrame passFailJFrame = PassFailJFrame.builder()
Please use the `builder` method instead of instantiating the `Builder` object directly.
test/jdk/javax/swing/border/Test4243289.java line 59:
> 57: SwingUtilities.invokeAndWait(() -> {
> 58: init();
> 59: });
Convert to `testUI` which streamlines the `main` method and simplifies creating the test UI.
Alternatively, use `splitUI` which could simplify the resulting UI.
test/jdk/javax/swing/border/Test4243289.java line 77:
> 75: frame.setSize(300, 300);
> 76: PassFailJFrame.addTestWindow(frame);
> 77: PassFailJFrame.positionTestWindow(frame, PassFailJFrame.Position.TOP_LEFT_CORNER);
Any particular reason why top left corner is used instead of centered-positioning?
-------------
PR Review: https://git.openjdk.org/jdk/pull/18197#pullrequestreview-1928952878
PR Review Comment: https://git.openjdk.org/jdk/pull/18197#discussion_r1520332384
PR Review Comment: https://git.openjdk.org/jdk/pull/18197#discussion_r1520317239
PR Review Comment: https://git.openjdk.org/jdk/pull/18197#discussion_r1520318570
PR Review Comment: https://git.openjdk.org/jdk/pull/18197#discussion_r1520320069
More information about the client-libs-dev
mailing list