Chromium Code Reviews| Index: mojo/dart/test/validation_test.dart |
| diff --git a/mojo/dart/test/validation_test.dart b/mojo/dart/test/validation_test.dart |
| index 4de347aadb4a19b40c88839146ecdd92ea8db83e..77cc2091c89f399379768b74c947221d062ec2f9 100644 |
| --- a/mojo/dart/test/validation_test.dart |
| +++ b/mojo/dart/test/validation_test.dart |
| @@ -22,6 +22,10 @@ class ConformanceTestInterfaceImpl implements ConformanceTestInterface { |
| _stub = new ConformanceTestInterfaceStub.fromEndpoint(endpoint, this); |
| } |
| + set onError(Function f) { |
| + _stub.onError = f; |
| + } |
| + |
| void _complete() => _completer.complete(null); |
| method0(double param0) => _complete(); |
| @@ -74,14 +78,13 @@ Future runTest( |
| var completer = new Completer(); |
| var conformanceImpl; |
| - runZoned(() { |
| - conformanceImpl = |
| - new ConformanceTestInterfaceImpl(completer, pipe.endpoints[0]); |
| - }, onError: (e, stackTrace) { |
| + conformanceImpl = |
| + new ConformanceTestInterfaceImpl(completer, pipe.endpoints[0]); |
| + conformanceImpl.onError = ((e) { |
| assert(e is MojoCodecError); |
| // TODO(zra): Make the error messages conform? |
| // assert(e == expected); |
| - conformanceImpl.close(immediate: true); |
| + conformanceImpl.close(); |
| pipe.endpoints[0].close(); |
| pipe.endpoints[1].close(); |
| handles.forEach((h) => h.close()); |
| @@ -94,10 +97,11 @@ Future runTest( |
| return completer.future.then((_) { |
|
Cutch
2015/11/11 17:47:17
... (_) async {
zra
2015/11/11 18:44:33
Acknowledged.
|
| assert(expected == "PASS"); |
| - conformanceImpl.close(); |
| - pipe.endpoints[0].close(); |
| - pipe.endpoints[1].close(); |
| - handles.forEach((h) => h.close()); |
| + conformanceImpl.close().then((_) { |
|
Cutch
2015/11/11 17:47:17
await conformanceImpl.close();
...
zra
2015/11/11 18:44:33
Changed to return instead of await since the resul
|
| + pipe.endpoints[0].close(); |
| + pipe.endpoints[1].close(); |
| + handles.forEach((h) => h.close()); |
| + }); |
| }, onError: (e) { |
| // Do nothing. |
| }); |