diff -r 5a907f38608d -r 8d29792a09c6 launcher/fx/src/test/java/org/apidesign/bck2brwsr/launcher/fximpl/JsClassLoaderTest.java --- a/launcher/fx/src/test/java/org/apidesign/bck2brwsr/launcher/fximpl/JsClassLoaderTest.java Wed Jun 26 18:44:21 2013 +0200 +++ b/launcher/fx/src/test/java/org/apidesign/bck2brwsr/launcher/fximpl/JsClassLoaderTest.java Thu Sep 12 14:15:47 2013 +0200 @@ -35,6 +35,7 @@ import org.apidesign.html.boot.impl.FnUtils; import static org.testng.Assert.*; import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -44,6 +45,7 @@ public class JsClassLoaderTest { private static ClassLoader loader; private static Class methodClass; + private static Fn.Presenter presenter; public JsClassLoaderTest() { } @@ -82,7 +84,7 @@ sb.append("})()"); try { final Object val = eng.eval(sb.toString()); - return new Fn() { + return new Fn(this) { @Override public Object invoke(Object thiz, Object... args) throws Exception { List all = new ArrayList(args.length + 1); @@ -109,10 +111,16 @@ } } - loader = FnUtils.newLoader(new Fr(), new Fr(), parent); + Fr fr = new Fr(); + presenter = fr; + loader = FnUtils.newLoader(fr, fr, parent); methodClass = loader.loadClass(JsMethods.class.getName()); } + @BeforeMethod public void registerPresenter() { + FnUtils.currentPresenter(presenter); + } + @Test public void noParamMethod() throws Throwable { Method plus = methodClass.getMethod("fortyTwo"); try {