8159135: [PIT] javax/swing/JMenuItem/8152981/MenuItemIconTest.java always fail
authorrchamyal
Wed, 15 Jun 2016 12:04:29 +0530
changeset 39516 0e1925d06a4d
parent 39515 5f9e9e8bf57b
child 39517 2be87ed267ad
8159135: [PIT] javax/swing/JMenuItem/8152981/MenuItemIconTest.java always fail Reviewed-by: alexsch Contributed-by: rajeev.chamyal@oracle.com
jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java
--- a/jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java	Tue Jun 14 11:33:56 2016 +0300
+++ b/jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java	Wed Jun 15 12:04:29 2016 +0530
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8152981
+ * @bug 8152981 8159135
  * @summary Double icons with JMenuItem setHorizontalTextPosition on Win 10
  * @requires (os.family == "windows")
  * @run main MenuItemIconTest
@@ -89,7 +89,7 @@
         robot.delay(2000);
         robot.mouseMove(x, y);
         Color c = robot.getPixelColor(x, y);
-        if (c.getRed() == 255) {
+        if (Color.RED.equals(c)) {
             errorMessage = "Test Failed";
         }
         robot.delay(5000);