Relates :
|
|
Relates :
|
|
Relates :
|
Reproducible: always Platform-specific: no Steps to reproduce: same as in parent bug. Steps to reproduce: 1. Set javascript char variable from java. 2. Try to read the same variable from java code. Expected: java.lang.String with single character OR java.lang.Character with original value. Actual: Numeric value of original character returned. Sample code: import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.StackPane; import javafx.scene.web.WebEngine; import javafx.scene.web.WebView; import javafx.stage.Stage; import netscape.javascript.JSObject; public class CharBindingFailure extends Application { @Override public void start(Stage stage) throws Exception { WebView view = new WebView(); WebEngine engine = view.getEngine(); stage.setScene(new Scene(new StackPane(view), 320, 240)); stage.setOnShown((e) -> { char value = 'a'; JSObject window = (JSObject) engine.executeScript("window;"); window.setMember("testObject", value); Object result = engine.executeScript("testObject;"); System.out.println(result.getClass()); }); stage.show(); } public static void main(String[] args) { launch(args); } } RULE "WebNodeAutomated/com/sun/fx/webnode/tests/bridge/javascript2java/AddRemoveCommonTypesTest/testAddRemoveJavaScriptBindingChar" Exception java.lang.AssertionError: expected:<a> but was:<97> RULE "WebNodeAutomated/com/sun/fx/webnode/tests/bridge/javascript2java/MethodCallsTest/testCharMethodCallA" Exception java.lang.AssertionError: expected:<n> but was:<110> RULE "WebNodeAutomated/com/sun/fx/webnode/tests/bridge/javascript2java/MethodCallsTest/testCharMethodCallA2" Exception java.lang.AssertionError: expected:<n> but was:<110>
|