Skip to content

Conversation

honkar-jdk
Copy link
Contributor

@honkar-jdk honkar-jdk commented Sep 30, 2025

This test fails on macOS 26 due to slight color mismatch at background frame edges. A offset of 4 pixels is added as fix.

CI testing passes on other platforms.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8365424: [macos26] java/awt/Frame/DisposeTest.java fails on macOS 26 (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27585/head:pull/27585
$ git checkout pull/27585

Update a local copy of the PR:
$ git checkout pull/27585
$ git pull https://git.openjdk.org/jdk.git pull/27585/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27585

View PR using the GUI difftool:
$ git pr show -t 27585

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27585.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 30, 2025

👋 Welcome back honkar! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 30, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Sep 30, 2025
@openjdk
Copy link

openjdk bot commented Sep 30, 2025

@honkar-jdk The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 30, 2025
@mlbridge
Copy link

mlbridge bot commented Sep 30, 2025

Webrevs

@@ -39,11 +39,13 @@
* @bug 4127271
* @summary Tests that disposing of a Frame with MenuBar removes all traces
* of the Frame from the screen.
* @run main/othervm -Dsun.java2d.uiScale=1 DisposeTest
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need to set scale factor=1, does the default break something?

Copy link
Contributor Author

@honkar-jdk honkar-jdk Oct 1, 2025

Choose a reason for hiding this comment

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

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.

for (int x = 0; x < bi.getWidth(); x++) {
for (int y = 0; y < bi.getHeight(); y++) {
for (int x = PIXEL_OFFSET; x < bi.getWidth() - PIXEL_OFFSET; x++) {
for (int y = PIXEL_OFFSET; y < bi.getHeight() - PIXEL_OFFSET; y++) {
Copy link
Member

Choose a reason for hiding this comment

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

It might be better to increase the size of the background frame so that its edge does not appear under the tested frame.

Copy link
Contributor Author

@honkar-jdk honkar-jdk Oct 1, 2025

Choose a reason for hiding this comment

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

Currently the backroundFrame is 200x200 and testFrame is 100x100. A difference of 100 pixels seems sufficient for this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants