use of com.google.gwt.core.client.impl.SchedulerImpl in project opennms by OpenNMS.
the class SearchStateTest method setUpClass.
@BeforeClass
public static void setUpClass() throws Exception {
GWTMockUtilities.disarm();
final SchedulerImpl scheduler = new TestSchedulerImpl();
Whitebox.setInternalState(SchedulerImpl.class, "INSTANCE", scheduler);
}
use of com.google.gwt.core.client.impl.SchedulerImpl in project flow by vaadin.
the class GwtPolymerModelTest method testInitialUpdateModelProperty_propertyIsUpdatableAndSchedulerIsNotExecuted_propertyIsNotSync.
public void testInitialUpdateModelProperty_propertyIsUpdatableAndSchedulerIsNotExecuted_propertyIsNotSync() {
addMockMethods(element);
String propertyName = "black";
String propertyValue = "coffee";
setModelProperty(node, propertyName, propertyValue);
initScheduler(new SchedulerImpl() {
@Override
public void scheduleDeferred(ScheduledCommand cmd) {
}
});
node.setNodeData(new UpdatableModelProperties(JsCollections.array("black")));
Binder.bind(node, element);
Reactive.flush();
assertEquals("Expected to have property with name " + propertyName + " defined after initial binding", propertyValue, WidgetUtil.getJsProperty(element, propertyName));
String newPropertyValue = "bubblegum";
emulatePolymerPropertyChange(element, propertyName, newPropertyValue);
Reactive.flush();
assertEquals("Expected to have property with name " + propertyName + " updated from client side", propertyValue, WidgetUtil.getJsProperty(element, propertyName));
MapProperty property = node.getMap(NodeFeatures.ELEMENT_PROPERTIES).getProperty(propertyName);
assertEquals(propertyValue, property.getValue());
assertFalse(tree.synchronizedProperties.has(node));
}
use of com.google.gwt.core.client.impl.SchedulerImpl in project flow by vaadin.
the class GwtDomApiTest method initTest.
private void initTest() {
DomApi.polymerMicroLoaded = false;
DomApi.impl = node -> (DomElement) node;
initScheduler(new SchedulerImpl() {
@Override
public void scheduleDeferred(ScheduledCommand cmd) {
}
});
GwtPolymerApiImplTest.clearPolymer();
verifyPolymerDomApiUsed(false);
verifyPolymerMicroLoaded(false);
}
Aggregations