8171909: [PIT] on Windows, failure of java/awt/Dialog/DialogAboveFrame/DialogAboveFrameTest.java
authordmarkov
Thu, 12 Jan 2017 22:01:15 +0300
changeset 43227 1641a55948d6
parent 43093 c0087c8cf069
child 43228 cca4e204cc6c
8171909: [PIT] on Windows, failure of java/awt/Dialog/DialogAboveFrame/DialogAboveFrameTest.java Reviewed-by: yan, serb
jdk/test/java/awt/Dialog/DialogAboveFrame/DialogAboveFrameTest.java
--- a/jdk/test/java/awt/Dialog/DialogAboveFrame/DialogAboveFrameTest.java	Thu Jan 12 12:21:47 2017 +0530
+++ b/jdk/test/java/awt/Dialog/DialogAboveFrame/DialogAboveFrameTest.java	Thu Jan 12 22:01:15 2017 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8169589
+ * @bug 8169589 8171909
  * @summary Activating a dialog puts to back another dialog owned by the same frame
  * @author Dmitry Markov
  * @library ../../regtesthelpers
@@ -68,7 +68,7 @@
         int y = point.y + (int)(dialog1.getHeight() * 0.9);
 
         try {
-            if (!robot.getPixelColor(x, y).equals(dialog1.getBackground())) {
+            if (!Util.testPixelColor(x, y, dialog1.getBackground(), 10, 100, robot)) {
                 throw new RuntimeException("Test FAILED: Dialog is behind the frame");
             }
         } finally {