RFR: JDK-8365424 : [macos26] java/awt/Frame/DisposeTest.java fails on macOS 26 [v2]

Sergey Bylokhov serb at openjdk.org
Fri Oct 3 02:01:47 UTC 2025


On Wed, 1 Oct 2025 00:41:04 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> test/jdk/java/awt/Frame/DisposeTest.java line 42:
>> 
>>> 40:  * @summary Tests that disposing of a Frame with MenuBar removes all traces
>>> 41:  *          of the Frame from the screen.
>>> 42:  * @run main/othervm -Dsun.java2d.uiScale=1 DisposeTest
>> 
>> Why do you need to set scale factor=1, does the default break something?
>
> It doesn't break as such but based on my observation a couple of previous tests on windows fail when there is fractional scaling + color comparison at edges. Set the uiScale to 1 to make the test robust.

We should also have some tests that cover the default scale. For this test it might be better to increase the offset change while using the default scale.

>> test/jdk/java/awt/Frame/DisposeTest.java line 80:
>> 
>>> 78: 
>>> 79:         for (int x = PIXEL_OFFSET; x < bi.getWidth() - PIXEL_OFFSET; x++) {
>>> 80:             for (int y = PIXEL_OFFSET; y < bi.getHeight() - PIXEL_OFFSET; y++) {
>> 
>> It might be better to increase the size of the background frame so that its edge does not appear under the tested frame.
>
> Currently the backroundFrame is 200x200 and testFrame is 100x100. A difference of 100 pixels seems sufficient for this case.

ok , then this change looks fine

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27585#discussion_r2393389879
PR Review Comment: https://git.openjdk.org/jdk/pull/27585#discussion_r2393388396


More information about the client-libs-dev mailing list