RFR: 8341162: Open source some of the AWT window test

Phil Race prr at openjdk.org
Tue Oct 1 22:13:37 UTC 2024


On Tue, 1 Oct 2024 10:34:53 GMT, Jayathirth D V <jdv at openjdk.org> wrote:

> Clean up and open source some of the AWT window tests.
> Automated test `OwnedWindowShowTest.java` is verified in our CI also and it passes on all platforms.

test/jdk/java/awt/Window/LocationByPlatform/TestLocationByPlatform.java line 28:

> 26:  * @bug 6318630
> 27:  * @summary Test that location by platform works
> 28:  * @library /open/test/jdk/java/awt/regtesthelpers

remove the leading "/open/test/jdk"

test/jdk/java/awt/Window/OwnedWindowShowTest/OwnedWindowShowTest.java line 38:

> 36: public class OwnedWindowShowTest {
> 37:     public static void main(String args[])
> 38:     {

I guess this should all be inside EventQueue.invokeAndWait() ?

test/jdk/java/awt/Window/OwnedWindowShowTest/OwnedWindowShowTest.java line 46:

> 44:             try {
> 45:                 window.setVisible(true);
> 46:             } catch (NullPointerException npe) {

Is there any point to this ? Just let the NPE propagate. This just hides the origin.

test/jdk/java/awt/Window/ResizeTest/ResizeTest.java line 29:

> 27:  * @summary Tests that focus lost is delivered to a lightweight component
> 28:  * in a disposed window
> 29:  * @library /open/test/jdk/java/awt/regtesthelpers

remove the leading "/open/test/jdk"

test/jdk/java/awt/Window/ShowWindowTest/ShowWindowTest.java line 28:

> 26:  * @bug 4084997
> 27:  * @summary See if Window can be created without its size explicitly set
> 28:  * @library /open/test/jdk/java/awt/regtesthelpers

again, remove the leading "/open/test/jdk"

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21284#discussion_r1783582504
PR Review Comment: https://git.openjdk.org/jdk/pull/21284#discussion_r1783583708
PR Review Comment: https://git.openjdk.org/jdk/pull/21284#discussion_r1783584378
PR Review Comment: https://git.openjdk.org/jdk/pull/21284#discussion_r1783582710
PR Review Comment: https://git.openjdk.org/jdk/pull/21284#discussion_r1783582818


More information about the client-libs-dev mailing list