8158178: java.awt.SplashScreen.getSize() returns incorrect size for high dpi splash screens
authoralexsch
Tue, 07 Jun 2016 20:15:01 +0400
changeset 39035 84023829c647
parent 39034 f2abf228ebe5
child 39036 b18e54dcaf69
8158178: java.awt.SplashScreen.getSize() returns incorrect size for high dpi splash screens Reviewed-by: alexsch Contributed-by: Robin Stevens <robin.stevens@scz.be>
jdk/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java
--- 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);