RFR: 8327787: Convert javax/swing/border/Test4129681.java applet test to main
Alexey Ivanov
aivanov at openjdk.org
Mon Mar 11 13:46:56 UTC 2024
On Mon, 11 Mar 2024 11:10:14 GMT, Tejesh R <tr at openjdk.org> wrote:
> Convert javax/swing/border/Test4129681.java applet test to main based test using PassFailJFrame.
Changes requested by aivanov (Reviewer).
test/jdk/javax/swing/border/Test4129681.java line 48:
> 46: String testInstructions = """
> 47: When applet starts, you'll see a checkbox
> 48: and a label with a titled border.
Update the instructions not to refer to applet.
test/jdk/javax/swing/border/Test4129681.java line 54:
> 52: """;
> 53: PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()
> 54: .title("JInternalFrame Instructions")
Is this test related to `JInternalFrame`? It doesn't look so.
test/jdk/javax/swing/border/Test4129681.java line 56:
> 54: .title("JInternalFrame Instructions")
> 55: .instructions(testInstructions)
> 56: .testTimeOut(5)
The default timeout could be left out.
test/jdk/javax/swing/border/Test4129681.java line 67:
> 65: }
> 66:
> 67: public static void init() {
I propose using `testUI` method of the builder, it hides the complexity of registering and positioning the frame. Modify this method to return the created `frame`.
See PR #17838 as an example or other PRs. The javadoc for `PassFailJFrame` also contains the recommended usage.
-------------
PR Review: https://git.openjdk.org/jdk/pull/18189#pullrequestreview-1927850517
PR Review Comment: https://git.openjdk.org/jdk/pull/18189#discussion_r1519732701
PR Review Comment: https://git.openjdk.org/jdk/pull/18189#discussion_r1519733729
PR Review Comment: https://git.openjdk.org/jdk/pull/18189#discussion_r1519734220
PR Review Comment: https://git.openjdk.org/jdk/pull/18189#discussion_r1519743444
More information about the client-libs-dev
mailing list