RFR: 8282270: java/awt/Robot Screen Capture tests fail after 8280861 [v2]

Maxim Kartashev duke at openjdk.java.net
Sat Mar 5 08:30:05 UTC 2022


On Fri, 4 Mar 2022 21:10:03 GMT, Phil Race <prr at openjdk.org> wrote:

> So having removed all of these, it isn't testing hi-dpi any more, is it ?

True. But there still is `ScreenCaptureTest.java` that will continue testing hi-dpi. 

Keeping `ScreenCaptureGtkTest.java` still makes sense because it verifies that `getPixelColor()` works precisely when neighboring pixels are of a different color; also, it shuffles the GTK versions.

Unfortunately, I see no way to fully and reliably test the changes for 8280861 with scaling above 1. I am forced to choose between two evils: 
1. either I set the scale above 1 and pick color inside a large area to be sure that I don't pick neighboring pixels because of an unfortunate window placement
1. or I set the scale to 1 and test colors of pixels sitting next to one another.

(1) was tested by the existing tests, (2) is tested by `ScreenCaptureGtkTest.java`.

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

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



More information about the client-libs-dev mailing list