jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java
changeset 39516 0e1925d06a4d
parent 38995 c1812168a1e9
child 46151 5fa789776f7d
--- 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);