8361606: ConsumeNextMnemonicKeyTypedTest.java fails on Windows: character typed with VK_A: a

8321303: Intermittent open/test/jdk/java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeNextMnemonicKeyTypedTest.java failure on Linux

Reviewed-by: dnguyen, honkar, aivanov
This commit is contained in:
Anass Baya 2025-09-30 13:57:07 +00:00 committed by Alexey Ivanov
parent 444007fc23
commit 07ea907e4f
3 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -377,6 +377,7 @@ public class BasicPopupMenuUI extends PopupMenuUI {
} else if (item.isEnabled()) {
// we have a menu item
manager.clearSelectedPath();
sun.awt.SunToolkit.consumeNextKeyTyped(e);
item.doClick();
}
e.consume();

View File

@ -487,7 +487,6 @@ java/awt/Graphics2D/DrawString/RotTransText.java 8316878 linux-all
java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.java 8257529 windows-x64
java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeForModalDialogTest/ConsumeForModalDialogTest.java 8302787 windows-all
java/awt/KeyboardFocusmanager/TypeAhead/MenuItemActivatedTest/MenuItemActivatedTest.java 8302787 windows-all
java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeNextMnemonicKeyTypedTest.java 8321303 linux-all
java/awt/Dialog/MakeWindowAlwaysOnTop/MakeWindowAlwaysOnTop.java 8266243 macosx-aarch64
java/awt/Dialog/ChoiceModalDialogTest.java 8161475 macosx-all

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,7 @@
/*
@test
@key headful
@bug 6346690
@bug 6346690 8361606 8321303
@summary Tests that key_typed is consumed after mnemonic key_pressed is handled for a menu item.
@library /test/lib
@build jdk.test.lib.Platform