-
Bug
-
Resolution: Fixed
-
P4
-
dev, 11, 17
-
None
-
b11
-
linux
Several tests that use Robot.getPixelColor() or createScreenCapture() fail on Linux with scaling set above 100%:
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java
javax/swing/JSlider/TestJSliderRendering.java
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java
javax/swing/JTextPane/TestJTextPaneBackgroundColor.java
javax/swing/JToolTip/TestTooltipBackgroundColor.java
The reason for failures is that the coordinates for the tested pixel are incorrect and the returned value, which is usually expected to be different because of a change in state, appears to be the same.
There are also two tests that *should* fail for the same reason, but don't:
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java
That's because the tests only check the color in the middle of a large square and, even if the coordinates are off by a few dozen pixels, the result is as expected.
However, those two tests fail with scaling set to 300% because of an attempt to capture an image of zero size.
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java
javax/swing/JSlider/TestJSliderRendering.java
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java
javax/swing/JTextPane/TestJTextPaneBackgroundColor.java
javax/swing/JToolTip/TestTooltipBackgroundColor.java
The reason for failures is that the coordinates for the tested pixel are incorrect and the returned value, which is usually expected to be different because of a change in state, appears to be the same.
There are also two tests that *should* fail for the same reason, but don't:
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java
That's because the tests only check the color in the middle of a large square and, even if the coordinates are off by a few dozen pixels, the result is as expected.
However, those two tests fail with scaling set to 300% because of an attempt to capture an image of zero size.
- relates to
-
JDK-8225118 Robot.createScreenCapture() returns black image on HiDPI linux with gtk3
-
- Resolved
-
-
JDK-8274939 Incorrect size of the pixel storage is used by the robot on macOS
-
- Resolved
-
-
JDK-8282270 java/awt/Robot Screen Capture tests fail after 8280861
-
- Resolved
-