RFR: 8326027: Comparing buffered images of white background frame fails in Mac
Tejesh R
tr at openjdk.org
Fri Aug 30 07:02:20 UTC 2024
On Thu, 29 Aug 2024 12:55:50 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> On analysis of captured image, it is observed that there are few pixels which vary slightly w.r.t to expected color. Hence tolerance is included in color comparison.
>> Tested in mach5 multiple time and its green.
>
> test/jdk/javax/swing/JFrame/JFrameBackgroundRefreshTest.java line 151:
>
>> 149: }
>> 150:
>> 151: private static boolean compareColor(Color c1, Color c2) {
>
> Shall we move such a method into `Util`?
>
> More and more test cases add tolerance to color comparison. Yeah, it's simple enough… and adding a library makes it somewhat harder to run a test in stand-alone mode, without jtreg.
Yeah, adding it to library will make it harder to run a test in stand-alone mode. There is this `Util.testBoundsColor()` in Util and I don't see much of test using it though. I guess it's better to leave the comparison to individual test, rather than trying to make it generic.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20760#discussion_r1738062680
More information about the client-libs-dev
mailing list