| Index: tests/isolate/src/TestFramework.dart
|
| diff --git a/tests/isolate/src/TestFramework.dart b/tests/isolate/src/TestFramework.dart
|
| index 97162ba279790417dcf6750567bf4728d8169d2a..1122e96e8f84e98daae013626c0d624199d0b361 100644
|
| --- a/tests/isolate/src/TestFramework.dart
|
| +++ b/tests/isolate/src/TestFramework.dart
|
| @@ -174,16 +174,17 @@ class TestExpectation {
|
| testCase.tearDown();
|
| }
|
|
|
| - Promise completes(var promise) {
|
| - if (!(promise is Promise || promise is Future)) {
|
| + Future completes(var future) {
|
| + if (!(future is Promise || future is Future)) {
|
| // TODO(mattsh) - remove this hack once we finish conversion of
|
| // Promise to Future
|
| throw "must pass Promise or Future to TestFramework.completes";
|
| }
|
| -
|
| - Promise result = new TestPromise(this);
|
| - promise.then((value) { result.complete(value); });
|
| - return result;
|
| + Completer completer = new Completer();
|
| + future.then(runs1((value) {
|
| + completer.complete(value);
|
| + }));
|
| + return completer.future;
|
| }
|
|
|
| Promise completesWithValue(Promise promise, var expected) {
|
| @@ -282,7 +283,7 @@ class AsynchronousTestCase extends TestCase {
|
|
|
| }
|
|
|
| -
|
| +// TODO(mattsh) - remove this once we have migrated the rpc system
|
| class TestPromise<T> extends PromiseImpl<T> {
|
|
|
| TestPromise(this.expect) : super();
|
|
|