8190861: [TESTBUG] javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java is wrong
authorpbansal
Tue, 28 Nov 2017 16:27:23 +0530
changeset 47978 700e0de899e8
parent 47977 dcf5dacd0b2b
child 47979 ecaa3569ec3d
8190861: [TESTBUG] javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java is wrong Reviewed-by: serb, psadhukhan Contributed-by: pankaj.b.bansal@oracle.com
test/jdk/javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java
--- a/test/jdk/javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java	Mon Nov 27 15:28:29 2017 -0800
+++ b/test/jdk/javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java	Tue Nov 28 16:27:23 2017 +0530
@@ -90,7 +90,7 @@
 
         Color color = robot.getPixelColor(loc.x + bounds.width / 2, loc.y + bounds.height + 3);
         System.out.println(color);
-        if (FG_COLOR.getRGB() == color.getRGB())
+        if (BG_COLOR.getRGB() != color.getRGB())
             throw new RuntimeException("Background is not translucent (" + color + ")");
 
         EventQueue.invokeAndWait(this::dispose);