On Fri, 29 Aug 2025 04:28:28 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> Khalid Boulanouare has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Disposes frames after each AWT component test
>>  - Removes redundant code for centring frames
>
> test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java line 172:
> 
>> 170:             if (!await) {
>> 171:                 throw new RuntimeException("Ancestor frame didn't 
>> receive " +
>> 172:                         "focus");
> 
> I guess this latch wait needs to be moved to `ancestor != null` block as it 
> is a noop for null ancestor

I will move the latch synchronization to `ancestor != null ` condition and test 
that it is still wokring.

> test/jdk/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java line 176:
> 
>> 174:             clickAndBlink(robot, lLoc);
>> 175:             if(ancestor != null && multiFramesTest){
>> 176:                 ancestor.dispose();
> 
> why to dispose only for multiFramesTest, even single frame needs to be 
> disposed!!

Most of the tests (Except the GlassPane tests) use multiple frames with each 
frame containing an AWT component to be tested with a defined Swing component. 
Before this change, these AWT component frames will be stacked one after an 
other at the end of the testing that AWT component frame. With this change, 
when a test is finished for an AWT component frame, we dispose the frame. For 
GlassPane test, they do not use multiple frames and so we only have 2 frames 
(background and actual testing frames) that are necessary for the whole 
lifecycle of the test, they become disposed at the end of the test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2312347950
PR Review Comment: https://git.openjdk.org/jdk/pull/25971#discussion_r2312347487

Reply via email to