RFR: 8285867 : Convert applet manual tests SelectionVisible.java to Frame and automate

Phil Race prr at openjdk.java.net
Wed May 4 23:43:19 UTC 2022


On Fri, 29 Apr 2022 22:39:28 GMT, lawrence.andrews <duke at openjdk.java.net> wrote:

> 1) Removed Applet dependent code and used Frame as top level.
> 2) Automated the manual test.
> 
> @shurymury

test/jdk/java/awt/TextArea/SelectionVisible/SelectionVisible.java line 51:

> 49: 
> 50:         frame.add(ta);
> 51:         frame.setAlwaysOnTop(true);

Is that important ? Remember it is conditionally supported functionality ?

test/jdk/java/awt/TextArea/SelectionVisible/SelectionVisible.java line 65:

> 63:             disposeFrame();
> 64:             throw new RuntimeException("Expected '34\n567' to be " +
> 65:                     "selected text, but got " + selectedText);

It probably doesn't matter but I'd like to see disposeFrame called with invokeAndWait
And you could restructure this to be simpler
invokeAndWait(::disposeFrame)
if (!selectedText ...) {
} else {
System.out.println("test passed");
}

and then you only need one call site for the dispose

-------------

PR: https://git.openjdk.java.net/jdk/pull/8477



More information about the client-libs-dev mailing list