RFR: 8340809: Open source few more AWT PopupMenu tests

Alexey Ivanov aivanov at openjdk.org
Wed Oct 9 16:53:02 UTC 2024


On Tue, 8 Oct 2024 17:05:51 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

> Few more AWT PopupMenu tests converted to either manual or automated and open sourced.

Looks good to me overall. There are a few nits.

test/jdk/java/awt/PopupMenu/ActivePopupCrashTest.java line 158:

> 156:         c.addMouseListener(new MouseAdapter() {
> 157:             @Override
> 158:             public void mouseClicked (MouseEvent e) {

Suggestion:

            public void mouseClicked(MouseEvent e) {

No space.

test/jdk/java/awt/PopupMenu/ActivePopupCrashTest.java line 163:

> 161: 
> 162:             @Override
> 163:             public void mousePressed (MouseEvent e) {

Suggestion:

            public void mousePressed(MouseEvent e) {

test/jdk/java/awt/PopupMenu/ActivePopupCrashTest.java line 168:

> 166: 
> 167:             @Override
> 168:             public void mouseReleased (MouseEvent e) {

Suggestion:

            public void mouseReleased(MouseEvent e) {

test/jdk/java/awt/PopupMenu/MultiplePopupMenusTest.java line 35:

> 33:  * @test
> 34:  * @bug 4186663 4265525
> 35:  * @summary Tests that plural PopupMenus can not appear at the same time

Suggestion:

 * @summary Tests that multiple PopupMenus cannot appear at the same time

test/jdk/java/awt/PopupMenu/PopupMenuCrash.java line 48:

> 46:         String INSTRUCTIONS = """
> 47:                 This tests a windows specific problem.
> 48:                 When you see a frame titled "PopupMenuCrash Test", right-click on it a lot

Suggestion:

                When you see a frame titled "PopupMenuCrash Test", right-click on it several times

Does it sound better?

test/jdk/java/awt/PopupMenu/PopupMenuCrash.java line 78:

> 76:                     firstPress = false;
> 77:                     try {
> 78:                         Thread.sleep(15000);

Suggestion:

                        Thread.sleep(10000);

Reduce to 10 seconds as stated in instructions?

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

Marked as reviewed by aivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21412#pullrequestreview-2357680313
PR Review Comment: https://git.openjdk.org/jdk/pull/21412#discussion_r1793840429
PR Review Comment: https://git.openjdk.org/jdk/pull/21412#discussion_r1793840693
PR Review Comment: https://git.openjdk.org/jdk/pull/21412#discussion_r1793840915
PR Review Comment: https://git.openjdk.org/jdk/pull/21412#discussion_r1793844415
PR Review Comment: https://git.openjdk.org/jdk/pull/21412#discussion_r1793846966
PR Review Comment: https://git.openjdk.org/jdk/pull/21412#discussion_r1793847637


More information about the client-libs-dev mailing list