Skip to content

Commit

Permalink
8292062: misc javax/swing tests failing
Browse files Browse the repository at this point in the history
Reviewed-by: prr
  • Loading branch information
prsadhuk committed Aug 10, 2022
1 parent 4913380 commit 83dc2e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,8 @@ public UIDefaults getDefaults() {
table.put("Menu.shortcutKeys",
new int[] {
SwingUtilities2.getSystemMnemonicKeyMask(),
SwingUtilities2.setAltGraphMask(
SwingUtilities2.getSystemMnemonicKeyMask())
});

// enabled antialiasing depending on desktop settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/*
* @test
* @key headful
* @bug 4618767
* @bug 4618767 8292062
* @summary This test confirms that typing a letter while a JList has focus now makes the selection
* not jump to the item whose text starts with that letter if that typed letter is accompanied
* by modifier keys such as ALT or CTRL(eg: ALT+F).
Expand Down Expand Up @@ -117,8 +117,8 @@ public static void runTest() throws Exception {
}

// Now operate Menu using Mnemonics, different key combinations for different OSes.
// For most OSes it's ALT+F; on macOS it's ALT+CNTRL+F except for Nimbus LaF.
if (isMac && !laf.contains("Nimbus")) {
// For most OSes it's ALT+F; on macOS it's ALT+CNTRL+F.
if (isMac) {
hitKeys(KeyEvent.VK_ALT, KeyEvent.VK_CONTROL, FILE_MENU);
} else {
hitKeys(KeyEvent.VK_ALT, FILE_MENU);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/*
* @test
* @key headful
* @bug 4618767
* @bug 4618767 8292062
* @summary This test confirms that typing a letter while a JTree has focus now makes the selection
* not jump to the item whose text starts with that letter if that typed letter is accompanied
* by modifier keys such as ALT or CTRL(eg: ALT+F).
Expand Down Expand Up @@ -107,8 +107,8 @@ public static void main(String[] args) throws Exception {
}

// Now operate Menu using Mnemonics, different key combinations for different OSes.
// For most OSes it's ALT+F; on macOS it's ALT+CNTRL+F except for Nimbus LaF.
if (isMac && !laf.contains("Nimbus")) {
// For most OSes it's ALT+F; on macOS it's ALT+CNTRL+F.
if (isMac) {
hitKeys(KeyEvent.VK_ALT, KeyEvent.VK_CONTROL, FILE_MENU);
} else {
hitKeys(KeyEvent.VK_ALT, FILE_MENU);
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/javax/swing/event/RightAltKeyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/*
* @test
* @key headful
* @bug 8194873
* @bug 8194873 8292062
* @requires (os.family == "Windows")
* @summary Checks that right ALT (ALT_GRAPH) key works on Swing components
* @run main RightAltKeyTest
Expand Down

1 comment on commit 83dc2e3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.