On Thu, 24 Feb 2022 09:31:57 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> DamonGuy has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fixed incomplete comment.
>
> test/jdk/javax/swing/JButton/HtmlButtonImageTest/HtmlButtonImageTest.java 
> line 93:
> 
>> 91:         Color rightClr = robot.getPixelColor(point.x + (SQUARE_WIDTH/2) 
>> - PIXEL_BUFFER, point.y);
>> 92:         Color topClr = robot.getPixelColor(point.x, point.y - 
>> (SQUARE_HEIGHT/2) + PIXEL_BUFFER);
>> 93:         Color botClr = robot.getPixelColor(point.x, point.y + 
>> (SQUARE_HEIGHT/2) - PIXEL_BUFFER);
> 
> there was an issue of using getPixelColor on retina screen on mac laptop as 
> @honkar-jdk  found out in 
> #[7219](https://git.openjdk.java.net/jdk/pull/7219)..She has to use 
> BufferedImage..Are you sure this is working on all mac CI system, mac 
> external monitor and mac laptop?

Initially, I ran into this issue as well a few weeks ago when I made the test. 
My solution was to check for redness by checking for 250 or greater R values 
with 10 or less G and B values instead of checking for exactly 255,0,0. When 
tested in mach5, some Macs failed with values that had pixels that fit within 
this color range, but wasn't exactly 255,0,0.

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

PR: https://git.openjdk.java.net/jdk/pull/7310

Reply via email to