JDK-8248551 : [TestBug] Ignore two failing FXML unit tests which use Nashorn script engine
  • Type: Bug
  • Component: javafx
  • Sub-Component: fxml
  • Affected Version: openjfx15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-06-30
  • Updated: 2020-06-30
  • Resolved: 2020-06-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx15Fixed
Related Reports
Relates :  
Description
Two of the FXML unit tests use the Nashorn JavaScript engine to test the FXML scripting capability. Nashorn has been deprecated since JDK 11 and has been removed in JDK 15.

When running with JDK 15-ea these two tests fail (as expected, since Nashorn is gone).

test.javafx.fxml.FXMLLoader_ScriptTest > testScriptHandler FAILED
    javafx.fxml.LoadException: Page language not specified.
    /C:/Users/kcr/javafx/jfx-kcr/jfx/rt/modules/javafx.fxml/build/resources/test/test/javafx/fxml/script_handler.fxml:35
        at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2625)
        at javafx.fxml/javafx.fxml.FXMLLoader$ScriptElement.processCharacters(FXMLLoader.java:1604)
        at javafx.fxml/javafx.fxml.FXMLLoader.processCharacters(FXMLLoader.java:2855)
        at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566)
        at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2470)
        at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2439)
        at test.javafx.fxml.FXMLLoader_ScriptTest.testScriptHandler(FXMLLoader_ScriptTest.java:134)

test.javafx.fxml.FXMLLoader_ScriptTest > testExternalScriptHandler FAILED
    javafx.fxml.LoadException: Unable to locate scripting engine for extension js.
    /C:/Users/kcr/javafx/jfx-kcr/jfx/rt/modules/javafx.fxml/build/resources/test/test/javafx/fxml/script_handler_external.fxml:31
        at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2625)
        at javafx.fxml/javafx.fxml.FXMLLoader$ScriptElement.processStartElement(FXMLLoader.java:1544)
        at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2726)
        at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2556)
        at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2470)
        at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2439)
        at test.javafx.fxml.FXMLLoader_ScriptTest.testExternalScriptHandler(FXMLLoader_ScriptTest.java:147)


These tests should be ignored if Nashorn script engine is not available.

In future, these tests will be rewritten/replaced under JDK-8245568.
Comments
Changeset: 527cc2b0 Author: Ajit Ghaisas <aghaisas@openjdk.org> Date: 2020-06-30 14:00:50 +0000 URL: https://git.openjdk.java.net/jfx/commit/527cc2b0
30-06-2020