Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 327906 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rwt/internal/lifecycle/UICallBackManager_Test.java (+21 lines)
Lines 109-114 Link Here
109
    assertFalse( UICallBackManager.getInstance().isCallBackRequestBlocked() );
109
    assertFalse( UICallBackManager.getInstance().isCallBackRequestBlocked() );
110
  }
110
  }
111
111
112
  // same test as above, but while UIThread running
113
  public void testWaitOnBackgroundThread_DuringLifecycle() throws Exception {
114
    final Throwable[] uiCallBackServiceHandlerThrowable = { null };
115
    ServiceContext context = ContextProvider.getContext();
116
    simulateUiCallBackThread( uiCallBackServiceHandlerThrowable, context );
117
    assertNull( uiCallBackServiceHandlerThrowable[ 0 ] );
118
    assertTrue( UICallBackManager.getInstance().isCallBackRequestBlocked() );
119
    Thread thread = new Thread( new Runnable() {
120
      public void run() {
121
        display.wake();
122
      }
123
    } );
124
    // assume that UIThread is currently running the life cycle
125
    UICallBackManager.getInstance().notifyUIThreadStart();
126
    thread.start();
127
    thread.join();
128
    Thread.sleep( SLEEP_TIME );
129
    UICallBackManager.getInstance().notifyUIThreadEnd();
130
    assertFalse( UICallBackManager.getInstance().isCallBackRequestBlocked() );
131
  }
132
112
  public void testAsyncExecWhileLifeCycleIsRunning() {
133
  public void testAsyncExecWhileLifeCycleIsRunning() {
113
    fakeRequestParam( display );
134
    fakeRequestParam( display );
114
    Fixture.fakePhase( PhaseId.READ_DATA );
135
    Fixture.fakePhase( PhaseId.READ_DATA );

Return to bug 327906