-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8064922: [macos] Test javax/swing/JTabbedPane/4624207/bug4624207.java fails #27371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back dnguyen! A progress list of the required criteria for merging this PR into |
|
@DamonGuy This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 543 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
| } | ||
| robot.keyPress(KeyEvent.VK_ALT); | ||
| robot.keyPress(KeyEvent.VK_B); | ||
| robot.keyRelease(KeyEvent.VK_ALT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyRelease should be other way around...ie VK_B first and then VK_ALT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you may want to check another test EditableFocusTest which also sets mnemonic "B" on a JButton and it passes in macOS..One difference is it uses setMnemonic(char) instead of setMnemonic(int)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I reversed the order of the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you may want to check another test
EditableFocusTestwhich also sets mnemonic "B" on a JButton and it passes in macOS..One difference is it uses setMnemonic(char) instead of setMnemonic(int)
I see that test's setMnemonic. This tabbedPane's API is forced to use setMnemonicAt(int, int). I figured, since mnemonics don't seem to be supported on macOS anyway, it does not really make sense to ProblemList this test for macOS only, and instead just exclude macOS from the test since the test fails with the current implementation using setMnemonicAt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not macOS but Aqua L&F problem it seems...
javax/swing/JTabbedPane/8134116/Bug8134116.java also uses setMnemonicAt but it uses Nimbus and it seems to pass on macOS as per CI
but I guess its ok to restrict as native macOS where it doesn't seem to work will run on its own Aqua L&F kind of interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even with Nimbus LaF javax/swing/JTabbedPane/8134116/Bug8134116.java the mnemonic is set as VK_Z for tab "zero" and though 'z' is underlined it does not respond to the keypress. Looks like it does not work completely in Nimbus LaF too.
|
Have you tried disabling the global menu on macOS and testing the mnemonics when the menu is embedded into the frame? Does it work? |
|
|
|
@prsadhuk Could you take another look at this? |
When I tested menu mnemonics on macOS ScreenMenuBar it works as expected. May be try @mrserb suggestion by using
|
It does not seem to make a difference in my testing. The test still fails the same way. Did you add any other changes in your testing when it passed for you? |
I tested the Apple screen bar mnemonics on Finder and IntelliJ IDE application. They worked fine. (I tested the native behavior and suggested to double-check the mnemonics behavior for Frame menu) The suggestion was to verify adding menu bar to the Frame and then test it by setting the "apple.laf.useScreenMenuBar" to true and false to see if the mnemonics works in both cases. |
I have manually added a JMenuBar to the frame in I have looked further into whether macOS officially supports mnemonics, and there are a few occurrences (as you've given examples of some) where mnemonics work, but there seems to be no official documentation that I can find that confirms that this is supported. As such, I believe this change can continue as-is for now. |
|
I guess the testing should not be about mnemonics which does pass in macos as can be seen in this comment but rather |
Right, but the post https://discussions.apple.com/thread/7983221?sortBy=rank discusses about general menu mnemonics and quite old post (filed in 2017). Now the menu mnemonics seem to work (native and IntelliJ app), thus wanted to verify if it is the case that mnemonics works frame menu and not for tab mnemonics. |
|
/integrate |
|
Going to push as commit be18e7e.
Your commit was automatically rebased without conflicts. |
When looking into this, it looks like macOS does not support mnemonics. It would therefore make sense to exclude macOS from this test as its main purpose is to test mnemonics on JTabbedPanes. Updated the test header to exclude macOS and test's keyPresses to remove the macOS specific inputs.
https://discussions.apple.com/thread/7983221?sortBy=rank
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27371/head:pull/27371$ git checkout pull/27371Update a local copy of the PR:
$ git checkout pull/27371$ git pull https://git.openjdk.org/jdk.git pull/27371/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27371View PR using the GUI difftool:
$ git pr show -t 27371Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27371.diff
Using Webrev
Link to Webrev Comment