changeset 39516:0e1925d06a4d

8159135: [PIT] javax/swing/JMenuItem/8152981/MenuItemIconTest.java always fail Reviewed-by: alexsch Contributed-by: rajeev.chamyal@oracle.com
author rchamyal
date Wed, 15 Jun 2016 12:04:29 +0530
parents 5f9e9e8bf57b
children 2be87ed267ad
files jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);