com.google.gwt.core.client.impl.SchedulerImpl Java Examples

The following examples show how to use com.google.gwt.core.client.impl.SchedulerImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GwtPolymerModelTest.java    From flow with Apache License 2.0 5 votes vote down vote up
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));
}
 
Example #2
Source File: GwtDomApiTest.java    From flow with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example #3
Source File: GwtDependencyLoaderTest.java    From flow with Apache License 2.0 4 votes vote down vote up
private native void initScheduler(SchedulerImpl scheduler)
/*-{
   @com.google.gwt.core.client.impl.SchedulerImpl::INSTANCE = scheduler;
}-*/;
 
Example #4
Source File: GwtPolymerModelTest.java    From flow with Apache License 2.0 4 votes vote down vote up
private native void initScheduler(SchedulerImpl scheduler)
/*-{
   @com.google.gwt.core.client.impl.SchedulerImpl::INSTANCE = scheduler;
}-*/;
 
Example #5
Source File: GwtDomApiTest.java    From flow with Apache License 2.0 4 votes vote down vote up
private native void initScheduler(SchedulerImpl scheduler)
/*-{
   @com.google.gwt.core.client.impl.SchedulerImpl::INSTANCE = scheduler;
}-*/;
 
Example #6
Source File: GwtAtmoshperePushConnectionTest.java    From flow with Apache License 2.0 4 votes vote down vote up
private native void initScheduler(SchedulerImpl scheduler)
/*-{
   @com.google.gwt.core.client.impl.SchedulerImpl::INSTANCE = scheduler;
}-*/;
 
Example #7
Source File: IdempotentFinally.java    From swellrt with Apache License 2.0 4 votes vote down vote up
protected IdempotentFinally() {
  this(SchedulerImpl.get());
}
 
Example #8
Source File: IdempotentFinally.java    From incubator-retired-wave with Apache License 2.0 4 votes vote down vote up
protected IdempotentFinally() {
  this(SchedulerImpl.get());
}