RFR: 8296275: Write a test to verify setAccelerator method of JMenuItem.
lawrence.andrews
duke at openjdk.org
Tue Nov 8 15:14:13 UTC 2022
On Tue, 8 Nov 2022 08:57:54 GMT, Naveen Narayanan <duke at openjdk.org> wrote:
> Colocate JMenuItemSetAcceleratorTest to a regression test.
>
> 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.
test/jdk/java/awt/Desktop/JMenuItemSetAcceleratorTest.java line 58:
> 56: }
> 57:
> 58: actionPerformLatch = new CountDownLatch(1);
You can create the instance as part of the declaration.
test/jdk/java/awt/Desktop/JMenuItemSetAcceleratorTest.java line 86:
> 84: if (frame != null) {
> 85: frame.dispose();
> 86: frame = null;
This statement does not harm but you can remove it.
-------------
PR: https://git.openjdk.org/jdk/pull/11035
More information about the client-libs-dev
mailing list