< prev index next >

tests/system/src/test/java/javafx/scene/layout/RegionUITestBase.java

Print this page
rev 9453 : [mq]: 2.8144680-tests

@@ -74,24 +74,24 @@
     }
 
     static final double TOLERANCE = 0.07;
 
     protected void assertColorEquals(Color expected, int x, int y, double tolerance) {
-        Color actual = getColor(x, y);
+        Color actual = getColorThreadSafe(x, y);
         try {
             assertColorEquals(expected, actual, tolerance);
         } catch (AssertionError error) {
             throw new AssertionError(error.getMessage() + " at position x=" + x + ", y=" + y);
         }
     }
 
     protected void assertColorDoesNotEqual(Color notExpected, int x, int y, double tolerance) {
-        Color actual = getColor(x, y);
+        Color actual = getColorThreadSafe(x, y);
         assertColorDoesNotEqual(notExpected, actual, tolerance);
     }
 
-    private Color getColor(int x, int y) {
+    private Color getColorThreadSafe(int x, int y) {
         AtomicReference<Color> color = new AtomicReference<>();
         runAndWait(() -> color.set(getColor(scene, x, y)));
         return color.get();
     }
 
< prev index next >