| Index: mojo/dart/apptests/dart_apptests/lib/src/pingpong_apptests.dart
|
| diff --git a/mojo/dart/apptests/dart_apptests/lib/src/pingpong_apptests.dart b/mojo/dart/apptests/dart_apptests/lib/src/pingpong_apptests.dart
|
| index a608d77f3da9bcb766fb45e0dd7ca5df642ae3b8..bc278e246fec9b33a894009a8f845636d011b06d 100644
|
| --- a/mojo/dart/apptests/dart_apptests/lib/src/pingpong_apptests.dart
|
| +++ b/mojo/dart/apptests/dart_apptests/lib/src/pingpong_apptests.dart
|
| @@ -121,5 +121,34 @@ pingpongApptests(Application application, String url) {
|
| await targetServiceProxy.close();
|
| await pingPongServiceProxy.close();
|
| });
|
| +
|
| + // Verify that Dart can implement an interface "request" parameter that
|
| + // isn't hooked up to an actual service implementation until after some
|
| + // delay.
|
| + test('Get Target Service Delayed', () async {
|
| + var pingPongServiceProxy = new PingPongServiceProxy.unbound();
|
| + pingPongServiceProxy.errorFuture.then((e) => fail('$e'));
|
| + application.connectToService(
|
| + "mojo:dart_pingpong", pingPongServiceProxy);
|
| +
|
| + var targetServiceProxy = new PingPongServiceProxy.unbound();
|
| + targetServiceProxy.errorFuture.then((e) => fail('$e'));
|
| + pingPongServiceProxy.ptr.getPingPongServiceDelayed(targetServiceProxy);
|
| +
|
| + var pingPongClient = new _TestingPingPongClient.unbound();
|
| + targetServiceProxy.ptr.setClient(pingPongClient.stub);
|
| +
|
| + targetServiceProxy.ptr.ping(1);
|
| + var pongValue = await pingPongClient.waitForPong();
|
| + expect(pongValue, equals(2));
|
| +
|
| + targetServiceProxy.ptr.ping(100);
|
| + pongValue = await pingPongClient.waitForPong();
|
| + expect(pongValue, equals(101));
|
| +
|
| + await pingPongClient.stub.close();
|
| + await targetServiceProxy.close();
|
| + await pingPongServiceProxy.close();
|
| + });
|
| });
|
| }
|
|
|