RFR: 8158801: [TEST_BUG] Mixing tests fail because of focus workaround trick [v23]

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Aug 19 04:21:39 UTC 2025


On Mon, 18 Aug 2025 13:22:58 GMT, Khalid Boulanouare <duke at openjdk.org> wrote:

>> Many Mixing tests failed because the work around click lands on the minimizing area in the window control and causes the tests to fail.
>> 
>> This fix changes the width of base frames which allows most of tests to pass.
>
> Khalid Boulanouare has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Updates copyright years

test/jdk/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java line 135:

> 133:                                 testedComponent.getPreferredSize().height + 20);
> 134:                         Component focusOwner = FocusManager.getCurrentManager()
> 135:                                 .getFocusOwner();

Usually we use `KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner()`

test/jdk/java/awt/Mixing/AWT_Mixing/ViewportOverlapping.java line 100:

> 98:         f.setLocationRelativeTo(null);
> 99:         f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
> 100:         f.setLocationRelativeTo(null);

it already calls `setLocationRelativeTo` above..

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2284018183
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2284017150


More information about the client-libs-dev mailing list