Need to convert Java string to Rhino's string on JDK7 closure
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 06 May 2014 16:48:12 +0200
branchclosure
changeset 1538dfddf572c7ec
parent 1536 7f477a85dbff
child 1539 ae8575329e1b
child 1540 32531a9626bf
Need to convert Java string to Rhino's string on JDK7
rt/vm/src/test/java/org/apidesign/vm4brwsr/TestVM.java
     1.1 --- a/rt/vm/src/test/java/org/apidesign/vm4brwsr/TestVM.java	Tue May 06 11:30:08 2014 +0200
     1.2 +++ b/rt/vm/src/test/java/org/apidesign/vm4brwsr/TestVM.java	Tue May 06 16:48:12 2014 +0200
     1.3 @@ -210,10 +210,7 @@
     1.4      }
     1.5  
     1.6      private static void defineAtoB(ScriptEngine js) throws ScriptException {
     1.7 -        js.eval("atob = function(s) { return org.apidesign.vm4brwsr.ResourcesTest.parseBase64Binary(s); }");
     1.8 -        
     1.9 -        Object ahoj = js.eval("atob('QWhvag==')");
    1.10 -        assertEquals(ahoj, "Ahoj", "Verify the atob function behaves properly");
    1.11 +        js.eval("atob = function(s) { return new String(org.apidesign.vm4brwsr.ResourcesTest.parseBase64Binary(s)); }");
    1.12      }
    1.13  
    1.14      Object loadClass(String loadClass, String name) throws ScriptException, NoSuchMethodException {