Use a `CountDownLatch` in `javax/swing/AbstractButton/bug6298940.java` instead 
of delay.  
Use `Util.hitMnemonics` instead of custom code to handle macOS.

I ran the updated test a few times with `JTREG=REPEAT_COUNT=20`, the test 
always passed in the CI.

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

Commit messages:
 - 8342524: Use latch in AbstractButton/bug6298940.java instead of delay

Changes: https://git.openjdk.org/jdk/pull/23301/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23301&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8342524
  Stats: 89 lines in 1 file changed: 89 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/23301.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23301/head:pull/23301

PR: https://git.openjdk.org/jdk/pull/23301

Reply via email to