diff -r faab3aefe91c javafx-ui-webnode/test/javafx/scene/web/JavaScriptBridgeTest.java --- a/javafx-ui-webnode/test/javafx/scene/web/JavaScriptBridgeTest.java Thu Jun 28 13:10:57 2012 -0500 +++ b/javafx-ui-webnode/test/javafx/scene/web/JavaScriptBridgeTest.java Thu Jun 28 15:25:02 2012 -0700 @@ -115,7 +115,7 @@ public @Test void testJSBridge3() throws InterruptedException { //final Document doc = getDocumentFor("test/html/dom.html"); final WebEngine web = getEngine(); - + submit(new Runnable() { public void run() { Object wino = web.executeScript("parent.parent"); assertTrue(wino instanceof netscape.javascript.JSObject); @@ -184,6 +184,20 @@ }}); } + @Test public void testJSCall1() throws InterruptedException { + final WebEngine web = getEngine(); + submit(new Runnable() { public void run() { + assertEquals("123.7", web.executeScript("123.67.toFixed(1)")); + try { + web.executeScript("123.67.toFixed(-1)"); + fail("JSException expected but not thrown"); + } catch (Throwable ex) { + String exp = "netscape.javascript.JSException: RangeError"; + assertEquals(exp, ex.toString().substring(0, exp.length())); + } + }}); + } + @Test public void testNullMemberName() throws InterruptedException { submit(new Runnable() { public void run() { JSObject parent = (JSObject) getEngine().executeScript("parent");