|
@@ -281,6 +281,19 @@ public class StackControllerTest extends BaseTest {
|
281
|
281
|
});
|
282
|
282
|
}
|
283
|
283
|
|
|
284
|
+ @Test
|
|
285
|
+ public void setRoot_doesNotCrashWhenCalledInQuickSuccession() {
|
|
286
|
+ disablePushAnimation(child1);
|
|
287
|
+ uut.setRoot(Collections.singletonList(child1), new CommandListenerAdapter());
|
|
288
|
+
|
|
289
|
+ uut.setRoot(Collections.singletonList(child2), new CommandListenerAdapter());
|
|
290
|
+ uut.setRoot(Collections.singletonList(child3), new CommandListenerAdapter());
|
|
291
|
+ animator.endPushAnimation(child2.getView());
|
|
292
|
+ animator.endPushAnimation(child3.getView());
|
|
293
|
+
|
|
294
|
+ assertContainsOnlyId(child3.getId());
|
|
295
|
+ }
|
|
296
|
+
|
284
|
297
|
@Test
|
285
|
298
|
public synchronized void pop() {
|
286
|
299
|
disablePushAnimation(child1, child2);
|