| Index: samples/tests/samples/src/swarm/SwarmTest.dart
|
| diff --git a/samples/tests/samples/src/swarm/SwarmTest.dart b/samples/tests/samples/src/swarm/SwarmTest.dart
|
| index 437f32996fa2c3fe632da0fa164313c84037947c..628ae034f86e5fd43aa95b3f363132bfbefa59ef 100644
|
| --- a/samples/tests/samples/src/swarm/SwarmTest.dart
|
| +++ b/samples/tests/samples/src/swarm/SwarmTest.dart
|
| @@ -45,7 +45,7 @@ void main() {
|
| }
|
|
|
| asyncTest('BackButton', 1, () {
|
| - serialInvokeAsync([() {
|
| + _serialInvokeAsync([() {
|
| Expect.equals(null, swarm.frontView.storyView); // verify initial state
|
|
|
| // Make sure we've transitioned to the section
|
| @@ -137,3 +137,18 @@ class UIStateProxy extends SwarmState {
|
| clearHistory();
|
| }
|
| }
|
| +
|
| +void _serialInvokeAsync(List closures) {
|
| + final length = closures.length;
|
| + if (length > 0) {
|
| + int i = 0;
|
| + void invokeNext() {
|
| + closures[i]();
|
| + i++;
|
| + if (i < length) {
|
| + window.setTimeout(invokeNext, 0);
|
| + }
|
| + }
|
| + window.setTimeout(invokeNext, 0);
|
| + }
|
| +}
|
|
|