mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Initialization of ClassLoaders isn't really needed
This commit is contained in:
parent
ada6225022
commit
ffd2f0211e
|
@ -24,7 +24,6 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.java.html.BrwsrCtx;
|
import net.java.html.BrwsrCtx;
|
||||||
import net.java.html.js.JavaScriptBody;
|
import net.java.html.js.JavaScriptBody;
|
||||||
import org.netbeans.html.boot.spi.Fn;
|
|
||||||
import org.netbeans.html.context.spi.Contexts;
|
import org.netbeans.html.context.spi.Contexts;
|
||||||
import org.netbeans.html.json.spi.JSONCall;
|
import org.netbeans.html.json.spi.JSONCall;
|
||||||
import org.netbeans.html.json.spi.Technology;
|
import org.netbeans.html.json.spi.Technology;
|
||||||
|
@ -38,16 +37,12 @@ import org.teavm.jso.JSObject;
|
||||||
import org.teavm.jso.browser.Window;
|
import org.teavm.jso.browser.Window;
|
||||||
import org.teavm.jso.dom.html.HTMLDocument;
|
import org.teavm.jso.dom.html.HTMLDocument;
|
||||||
import org.teavm.jso.dom.html.HTMLElement;
|
import org.teavm.jso.dom.html.HTMLElement;
|
||||||
import org.testng.Assert;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Jaroslav Tulach <jtulach@netbeans.org>
|
* @author Jaroslav Tulach <jtulach@netbeans.org>
|
||||||
*/
|
*/
|
||||||
public final class KnockoutFXTest extends KnockoutTCK implements Transfer, WSTransfer<WSImpl> {
|
public final class KnockoutFXTest extends KnockoutTCK implements Transfer, WSTransfer<WSImpl> {
|
||||||
private static Class<?> browserClass;
|
|
||||||
private static Fn.Presenter browserContext;
|
|
||||||
|
|
||||||
private KO4J ko4j = new KO4J();
|
private KO4J ko4j = new KO4J();
|
||||||
private final Map<String, Request> urlMap = new HashMap<>();
|
private final Map<String, Request> urlMap = new HashMap<>();
|
||||||
private final Map<String, WSImpl> wsUrlMap = new HashMap<>();
|
private final Map<String, WSImpl> wsUrlMap = new HashMap<>();
|
||||||
|
@ -59,29 +54,6 @@ public final class KnockoutFXTest extends KnockoutTCK implements Transfer, WSTra
|
||||||
return testClasses();
|
return testClasses();
|
||||||
}
|
}
|
||||||
|
|
||||||
static ClassLoader getClassLoader() throws InterruptedException {
|
|
||||||
while (browserClass == null) {
|
|
||||||
KnockoutFXTest.class.wait();
|
|
||||||
}
|
|
||||||
return browserClass.getClassLoader();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initialized(Class<?> browserCls) throws Exception {
|
|
||||||
browserClass = browserCls;
|
|
||||||
browserContext = Fn.activePresenter();
|
|
||||||
KnockoutFXTest.class.notifyAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initialized() throws Exception {
|
|
||||||
Assert.assertSame(
|
|
||||||
KnockoutFXTest.class.getClassLoader(),
|
|
||||||
ClassLoader.getSystemClassLoader(),
|
|
||||||
"No special classloaders"
|
|
||||||
);
|
|
||||||
KnockoutFXTest.initialized(KnockoutFXTest.class);
|
|
||||||
browserContext = Fn.activePresenter();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BrwsrCtx createContext() {
|
public BrwsrCtx createContext() {
|
||||||
KO4J ko4j = new KO4J();
|
KO4J ko4j = new KO4J();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user