Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8295007: javax/swing/JRadioButton/4314194/bug4314194.java fails in mach5 for WIndowLookAndFeel #10618

Closed
wants to merge 2 commits into from

Conversation

prsadhuk
Copy link
Contributor

@prsadhuk prsadhuk commented Oct 8, 2022

javax/swing/JRadioButton/4314194/bug4314194.java correct color pixels pixel % varies between 30% for Metal to about 20% for Nimbus to about 19% for Windows L&F. But Nimbus in linux correct color pixel % falls to about 14%
so adjusted % tolerance check to 10
Also, JDK-8075916 is fixed for NimbusL&F but same issue is present for GTK L&F which is to be addressed separately as JDK-8295006 so problemlisted for now


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-8295007: javax/swing/JRadioButton/4314194/bug4314194.java fails in mach5 for WIndowLookAndFeel

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10618

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 8, 2022

👋 Welcome back psadhukhan! 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 openjdk bot added the rfr Pull request is ready for review label Oct 8, 2022
@openjdk
Copy link

openjdk bot commented Oct 8, 2022

@prsadhuk 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 client client-libs-dev@openjdk.org label Oct 8, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 8, 2022

Webrevs

Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

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

I propose using the ‘full block’ character (U+2588 █) which results in a text filled with the selected color. The tolerance could be even increased in this case.

        checkBox = new JCheckBox("\u2588".repeat(5));
        radioButton = new JRadioButton("\u2588".repeat(5));

Otherwise, the test depends on the font used, if the strokes are thin, it may fail.

As I posted in the comment, the test should disable antialiasing and count the pixels of the correct color, it should ignore the pixels of the background color. To accommodate for anti-aliasing on macOS and rendering of the control itself, the tolerance which is already in place could be used. I can take on this improvement. Changing the text of the controls should already make the test robust enough.

@mrserb
Copy link
Member

mrserb commented Oct 10, 2022

I suggest to recheck that the final version of this change will be able to verify an initial bug.

@prsadhuk
Copy link
Contributor Author

propose using the ‘full block’ character (U+2588 █)

OK, modified...Seems good, also regression can still be tested..Have kept the tolerance same, although it could have been increased. Maybe during improvement PR....

@aivanov-jdk
Copy link
Member

Have kept the tolerance same

You've kept the updated value of 10 compared to the original one of 20.

I propose keeping 20 as it was before. The use of the ‘full block’ character ensures there are many pixels of the correct color.

@aivanov-jdk
Copy link
Member

I suggest to recheck that the final version of this change will be able to verify an initial bug.

I believe this is implied, isn't it?

Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

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

Looks good to me.

The only question is the value of tolerance: the original one vs. the updated one.

@openjdk
Copy link

openjdk bot commented Oct 10, 2022

@prsadhuk This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8295007: javax/swing/JRadioButton/4314194/bug4314194.java fails in mach5 for WIndowLookAndFeel

Reviewed-by: aivanov, tr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 14 new commits pushed to the master branch:

  • 6ed74ef: 8295005: compiler/loopopts/TestRemoveEmptyLoop.java fails with release VMs after JDK-8294839
  • 8a148bc: 8294848: Unnecessary SSLCipher dispose implementations
  • 8713dfa: 8294541: java/io/BufferedInputStream/TransferTo.java fails with OOME
  • 542cc60: 8294366: RISC-V: Partially mark out incompressible regions
  • 495c043: 7124710: interleaved RedefineClasses() and RetransformClasses() calls may have a problem
  • d39d8c8: 8170389: java.text.DigitList.getDouble() : Controversy between javadoc and code
  • 3466e99: 8294691: dynamicArchive/RelativePath.java is running other test case
  • 823b53d: 8294987: Streamline DerOutputStream write
  • 6a266c4: 8292879: com/sun/jdi/ClassUnloadEventTest.java failed due to classes not unloading
  • fe7a461: 8294920: Missing SP value in Linux x86_32 thread context
  • ... and 4 more: https://git.openjdk.org/jdk/compare/7a194d31a3f2f78211f035f4591845bf2b465aec...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 10, 2022
@prsadhuk
Copy link
Contributor Author

Tolerance has been kept same as in the original closed test

@prsadhuk
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Oct 10, 2022

Going to push as commit 269252a.
Since your change was applied there have been 14 commits pushed to the master branch:

  • 6ed74ef: 8295005: compiler/loopopts/TestRemoveEmptyLoop.java fails with release VMs after JDK-8294839
  • 8a148bc: 8294848: Unnecessary SSLCipher dispose implementations
  • 8713dfa: 8294541: java/io/BufferedInputStream/TransferTo.java fails with OOME
  • 542cc60: 8294366: RISC-V: Partially mark out incompressible regions
  • 495c043: 7124710: interleaved RedefineClasses() and RetransformClasses() calls may have a problem
  • d39d8c8: 8170389: java.text.DigitList.getDouble() : Controversy between javadoc and code
  • 3466e99: 8294691: dynamicArchive/RelativePath.java is running other test case
  • 823b53d: 8294987: Streamline DerOutputStream write
  • 6a266c4: 8292879: com/sun/jdi/ClassUnloadEventTest.java failed due to classes not unloading
  • fe7a461: 8294920: Missing SP value in Linux x86_32 thread context
  • ... and 4 more: https://git.openjdk.org/jdk/compare/7a194d31a3f2f78211f035f4591845bf2b465aec...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 10, 2022
@aivanov-jdk
Copy link
Member

Tolerance has been kept same as in the original closed test

Yes, I'm sorry I didn't notice that change has been removed. Thank you.

@openjdk openjdk bot closed this Oct 10, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 10, 2022
@openjdk
Copy link

openjdk bot commented Oct 10, 2022

@prsadhuk Pushed as commit 269252a.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@prsadhuk prsadhuk deleted the JDK-8295007 branch October 10, 2022 11:55
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 integrated Pull request has been integrated
4 participants