< prev index next >
tests/system/src/test/java/javafx/scene/layout/RegionUITestBase.java
Print this page
rev 9453 : [mq]: 2.8144680-tests
*** 74,97 ****
}
static final double TOLERANCE = 0.07;
protected void assertColorEquals(Color expected, int x, int y, double tolerance) {
! Color actual = getColor(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);
assertColorDoesNotEqual(notExpected, actual, tolerance);
}
! private Color getColor(int x, int y) {
AtomicReference<Color> color = new AtomicReference<>();
runAndWait(() -> color.set(getColor(scene, x, y)));
return color.get();
}
--- 74,97 ----
}
static final double TOLERANCE = 0.07;
protected void assertColorEquals(Color expected, int x, int y, double tolerance) {
! 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 = getColorThreadSafe(x, y);
assertColorDoesNotEqual(notExpected, actual, tolerance);
}
! 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 >