On Fri, 30 Oct 2020 06:11:40 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> This test could fail on windows for two reasons:
>  - The window does not fit the small screen, and the robot captures the image 
> outside the screen. Especially if the screen is small but some scale (like 
> 150%) is set.
>  - The test paints and captures the button in the frame, then resize the 
> frame and again paint and captures the button. The problem occurs if the 
> fractional scale is used(like 125%), in that case, the button could be 
> shifted by one pixel due to rounding depending on what position it was 
> started to be drawn.
> 
> The solution is to always use the same uiscale=1, an updated test still can 
> reproduce the JDK-6796710

test/jdk/javax/swing/text/CSSBorder/6796710/bug6796710.java line 130:

> 128:         BufferedImage pnBottomImage = getPnBottomImage();
> 129:         if (!Util.compareBufferedImages(bufferedImage, pnBottomImage)) {
> 130:             ImageIO.write(bufferedImage, "png", new 
> File("bufferedImage"));

I guess .png extension needs to be added to new File()

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

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

Reply via email to