Skip to content

Commit ad72fd6

Browse files
authored
Update MiscellaneousTest.java
1 parent 717dd93 commit ad72fd6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

modules/javafx.web/src/test/java/test/javafx/scene/web/MiscellaneousTest.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,17 @@ void waitForCompletion() {
474474
});
475475
}
476476

477-
@Test public void loadJrtCssFileSuccessfully() {
478-
getEngine().setUserStyleSheetLocation("jrt:/javafx.web/html/imported-styles.css");
477+
@Test public void jrtCssFileIsNotRejected() {
478+
submit(() -> {
479+
try {
480+
getEngine().setUserStyleSheetLocation("jrt:/javafx.web/html/imported-styles.css");
481+
} catch (IllegalArgumentException e) {
482+
// A jrt file is supposed to be a valid argument
483+
throw new AssertionError(e);
484+
} catch (RuntimeException e) {
485+
// The css file cannot be loaded in the tests (since they are not modularized).
486+
// We thus simply ignore this exception here
487+
}
488+
});
479489
}
480490
}

0 commit comments

Comments
 (0)