RFR: 8347836: Disabled PopupMenu shows shortcuts on Mac

Abhishek Kumar abhiscxk at openjdk.org
Mon Feb 3 07:10:47 UTC 2025


On Fri, 31 Jan 2025 19:54:29 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:

> The test instructions say that disabled PopupMenus should not have shortcuts shown, but on MacOS, these shortcuts still appear. When checking native MacOS15 behavior, disabled PopupMenus still have shortcuts shown. Since the test doesn't modify the popup's shortcuts other than adding the shortcut for `A`, it makes sense that the result matches native behavior. So, I modified the test instructions instead to exclude MacOS from this step.

You may remove `.rows((int) INSTRUCTIONS.lines().count() + 2)`, not mandatory though.

test/jdk/java/awt/PopupMenu/PopupMenuVisuals.java line 50:

> 48:           - Menu is disabled
> 49:           - Menu has caption 'Popup menu' (only applicable for linux)
> 50:           - Menu items don't show shortcuts (except on MacOS)

Is it good to restrict the test for "Windows and Linux" only ?

test/jdk/java/awt/PopupMenu/PopupMenuVisuals.java line 84:

> 82:         //Get things going.  Request focus, set size, et cetera
> 83:         frame = new Frame("PopupMenuVisuals");
> 84:         frame.setSize(200,200);

Suggestion:

        frame.setSize(200, 200);

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

PR Review: https://git.openjdk.org/jdk/pull/23402#pullrequestreview-2589061929
PR Review Comment: https://git.openjdk.org/jdk/pull/23402#discussion_r1938875484
PR Review Comment: https://git.openjdk.org/jdk/pull/23402#discussion_r1938880535


More information about the client-libs-dev mailing list