< prev index next >

test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java

Print this page

        

*** 102,111 **** --- 102,121 ---- Graphics2D g = splashScreen.createGraphics(); Rectangle splashBounds = splashScreen.getBounds(); 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); float scaleFactor = getScaleFactor(); Color testColor = (1 < scaleFactor) ? test.color2x : test.color1x;
< prev index next >