RFR: 8296275: Write a test to verify setAccelerator method of JMenuItem [v6]
Sergey Bylokhov
serb at openjdk.org
Fri Dec 2 04:27:06 UTC 2022
On Mon, 21 Nov 2022 05:20:29 GMT, Naveen Narayanan <duke at openjdk.org> wrote:
>> This testcase will
>> 1) Verify setAccelerator method of JMenuitem.
>> 2) Check that the selection of a menu item in the menu bar will generate action by a key combination of META+M.
>>
>> Testing:
>> Tested using Mach5(20 times per platform) in Mac OS, Linux and Windows and got all pass.
>
> Naveen Narayanan has updated the pull request incrementally with one additional commit since the last revision:
>
> 8296275: Review comments fixed.
test/jdk/java/awt/Desktop/JMenuItemSetAcceleratorTest.java line 1:
> 1: /* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
I think that the first line usually just `/*`
test/jdk/java/awt/Desktop/JMenuItemSetAcceleratorTest.java line 76:
> 74: public static void main(String[] args) throws Exception {
> 75: try {
> 76: SwingUtilities.invokeAndWait(JMenuItemSetAcceleratorTest::createAndShow);
I suggest clicking on the frame to make sure it is in focus before pressing the shortcut.
-------------
PR: https://git.openjdk.org/jdk/pull/11035
More information about the client-libs-dev
mailing list