changeset 39035:84023829c647

8158178: java.awt.SplashScreen.getSize() returns incorrect size for high dpi splash screens Reviewed-by: alexsch Contributed-by: Robin Stevens <robin.stevens@scz.be>
author alexsch
date Tue, 07 Jun 2016 20:15:01 +0400
parents f2abf228ebe5
children b18e54dcaf69
files jdk/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);