| 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..0d344e2e25d6de68d5e3053342a152e4b5d21741 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();
|
| @@ -35,17 +39,19 @@ class ConformanceTestInterfaceImpl implements ConformanceTestInterface {
|
| param0.structD.messagePipes.forEach((h) => h.close());
|
| _complete();
|
| }
|
| +
|
| method6(List<List<int>> param0) => _complete();
|
| method7(StructF param0, List<List<int>> param1) => _complete();
|
| method8(List<List<String>> param0) => _complete();
|
| method9(List<List<MojoHandle>> param0) {
|
| if (param0 != null) {
|
| param0.forEach((l) => l.forEach((h) {
|
| - if (h != null) h.close();
|
| - }));
|
| + if (h != null) h.close();
|
| + }));
|
| }
|
| _complete();
|
| }
|
| +
|
| method10(Map<String, int> param0) => _complete();
|
| method11(StructG param0) => _complete();
|
| method12(double param0, [Function responseFactory]) {
|
| @@ -55,11 +61,13 @@ class ConformanceTestInterfaceImpl implements ConformanceTestInterface {
|
| _complete();
|
| return new Future.value(responseFactory(0.0));
|
| }
|
| +
|
| method13(InterfaceAProxy param0, int param1, InterfaceAProxy param2) {
|
| if (param0 != null) param0.close(immediate: true);
|
| if (param2 != null) param2.close(immediate: true);
|
| _complete();
|
| }
|
| +
|
| method14(UnionA param0) => _complete();
|
| method15(StructH param0) => _complete();
|
|
|
| @@ -74,14 +82,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 +101,11 @@ Future runTest(
|
|
|
| return completer.future.then((_) {
|
| assert(expected == "PASS");
|
| - conformanceImpl.close();
|
| - pipe.endpoints[0].close();
|
| - pipe.endpoints[1].close();
|
| - handles.forEach((h) => h.close());
|
| + return conformanceImpl.close().then((_) {
|
| + pipe.endpoints[0].close();
|
| + pipe.endpoints[1].close();
|
| + handles.forEach((h) => h.close());
|
| + });
|
| }, onError: (e) {
|
| // Do nothing.
|
| });
|
|
|