diff --git a/tests/system/src/test/java/test/javafx/scene/web/StraightLineTest.java b/tests/system/src/test/java/test/javafx/scene/web/StraightLineTest.java index 8a1d26dc19e..24c7a96c7a8 100644 --- a/tests/system/src/test/java/test/javafx/scene/web/StraightLineTest.java +++ b/tests/system/src/test/java/test/javafx/scene/web/StraightLineTest.java @@ -29,7 +29,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; import java.util.concurrent.CountDownLatch; @@ -107,8 +106,6 @@ public void setupTestObjects() { } @Test public void testLine() { - // JDK-8296590 - assumeFalse(PlatformUtil.isLinux()); final CountDownLatch webViewStateLatch = new CountDownLatch(1); @@ -137,6 +134,7 @@ public void setupTestObjects() { "margin:0px;\n"+ "}\n" + "div {\n" + + "white-space:nowrap;\n"+ "padding:0px;\n"+ "width:150px;\n"+ "height:20px;\n"+ @@ -154,6 +152,8 @@ public void setupTestObjects() { }); assertTrue("Timeout when waiting for focus change ", Util.await(webViewStateLatch)); + //introduce sleep , so that web contents would be loaded , then take snapshot for testing + Util.sleep(1000); Util.runAndWait(() -> { WritableImage snapshot = straightLineTestApp.primaryStage.getScene().snapshot(null);