use of com.github.anba.es6draft.runtime.extensions.timer.Timers in project es6draft by anba.
the class PromiseUnwrappingTest method setUp.
@Before
public void setUp() throws Throwable {
assumeTrue("Test disabled", test.isEnabled());
realm.initialize(new SystemConsole(), test);
exceptionHandler.setExecutionContext(realm.get().defaultContext());
async = realm.get().createGlobalProperties(new PromiseAsync(), PromiseAsync.class);
timers = realm.get().createGlobalProperties(new Timers(), Timers.class);
}
use of com.github.anba.es6draft.runtime.extensions.timer.Timers in project es6draft by anba.
the class PromiseAPlusTest method setUp.
@Before
public void setUp() throws Throwable {
assumeTrue("Test disabled", test.isEnabled());
realm.initialize(new SystemConsole(), test);
exceptionHandler.setExecutionContext(realm.get().defaultContext());
async = realm.get().createGlobalProperties(new PromiseAsync(), PromiseAsync.class);
timers = realm.get().createGlobalProperties(new Timers(), Timers.class);
}
use of com.github.anba.es6draft.runtime.extensions.timer.Timers in project es6draft by anba.
the class UnhandledRejectionTest method setUp.
@Before
public void setUp() throws Throwable {
assumeTrue("Test disabled", test.isEnabled());
realm.initialize(new SystemConsole(), test);
exceptionHandler.setExecutionContext(realm.get().defaultContext());
timers = realm.get().createGlobalProperties(new Timers(), Timers.class);
if (test.negative) {
expected.expect(Matchers.either(Matchers.instanceOf(UnhandledRejectionException.class)).or(Matchers.instanceOf(MissingRejectionException.class)));
} else {
errorHandler.match(StandardErrorHandler.defaultMatcher());
exceptionHandler.match(ScriptExceptionHandler.defaultMatcher());
}
}
use of com.github.anba.es6draft.runtime.extensions.timer.Timers in project es6draft by anba.
the class ES6Test method setUp.
@Before
public void setUp() throws Throwable {
assumeTrue("Test disabled", test.isEnabled());
realm.initialize(new NullConsole(), test);
timers = realm.get().createGlobalProperties(new Timers(), Timers.class);
realm.get().createGlobalProperties(new DrainMicrotasks(), DrainMicrotasks.class);
exceptionHandler.setExecutionContext(realm.get().defaultContext());
}
Aggregations