8158178: java.awt.SplashScreen.getSize() returns incorrect size for high dpi splash screens
Reviewed-by: alexsch
Contributed-by: Robin Stevens <robin.stevens@scz.be>
--- a/jdk/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java Tue Jun 07 11:57:59 2016 +0300
+++ b/jdk/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java Tue Jun 07 20:15:01 2016 +0400
@@ -104,6 +104,16 @@
int screenX = (int) splashBounds.getCenterX();
int screenY = (int) splashBounds.getCenterY();
+ if (splashBounds.width != IMAGE_WIDTH) {
+ throw new RuntimeException(
+ "SplashScreen#getBounds has wrong width");
+ }
+
+ if (splashBounds.height != IMAGE_HEIGHT) {
+ throw new RuntimeException(
+ "SplashScreen#getBounds has wrong height");
+ }
+
Robot robot = new Robot();
Color splashScreenColor = robot.getPixelColor(screenX, screenY);