On Fri, 2 Dec 2022 03:47:16 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> The above test was failing due to incorrect pixel color and wrong window 
>> bounds on Mac-ARM, Windows and Linux platforms.
>> 
>> The following changes have been made:
>> - Correct window bounds are obtained using the screen device being tested 
>> (this test checks FullScreen functionality on multiple screen devices).
>> - Color tolerance has been added for color check
>> - Instead of scanning the full screen to check pixel color, vertical and 
>> horizontal scans are done at the far right and bottom end to ensure that 
>> window is in full screen mode w.r.t to screen device and the window bounds 
>> are as expected.
>> 
>> CI testing passes on all platforms (tested 50 times per platform).
>
> test/jdk/java/awt/FullScreen/FullScreenInsets/FullScreenInsets.java line 51:
> 
>> 49:     private static Robot robot = null;
>> 50:     private static int deviceCount = 0;
>> 51:     private static final float TOLERANCE = 10;
> 
> Are you sure that we need so big tolerance just to capture the green and red 
> colors? We have CheckCommonColors which checks all our common colors via 
> robot, and seems it works fine w/o tolerance.

I see your point. Thanks you for suggesting CheckCommonColors. I will recheck 
using `CheckCommonColors` test on all platforms and reduce the tolerance to a 
lower value so that it has more strict constraint on allowed colors.

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

PR: https://git.openjdk.org/jdk/pull/11462

Reply via email to