| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 library echo_apptests; | 5 library echo_apptests; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:mojo.application'; | |
| 9 import 'dart:mojo.bindings'; | |
| 10 import 'dart:mojo.core'; | |
| 11 | 8 |
| 9 import 'package:mojo/public/dart/application.dart'; |
| 10 import 'package:mojo/public/dart/bindings.dart'; |
| 11 import 'package:mojo/public/dart/core.dart'; |
| 12 import 'package:apptest/apptest.dart'; | 12 import 'package:apptest/apptest.dart'; |
| 13 import 'package:services/dart/test/echo_service.mojom.dart'; | 13 import 'package:services/dart/test/echo_service.mojom.dart'; |
| 14 | 14 |
| 15 echoApptests(Application application, String url) { | 15 echoApptests(Application application, String url) { |
| 16 group('Echo Service Apptests', () { | 16 group('Echo Service Apptests', () { |
| 17 test('String', () async { | 17 test('String', () async { |
| 18 var echoProxy = new EchoServiceProxy.unbound(); | 18 var echoProxy = new EchoServiceProxy.unbound(); |
| 19 application.connectToService("mojo:dart_echo", echoProxy); | 19 application.connectToService("mojo:dart_echo", echoProxy); |
| 20 | 20 |
| 21 var v = await echoProxy.ptr.echoString("foo"); | 21 var v = await echoProxy.ptr.echoString("foo"); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 throw 'unreachable'; | 79 throw 'unreachable'; |
| 80 }, onError: (e) { | 80 }, onError: (e) { |
| 81 expect(e is ProxyCloseException, isTrue); | 81 expect(e is ProxyCloseException, isTrue); |
| 82 }); | 82 }); |
| 83 | 83 |
| 84 return new Future.delayed( | 84 return new Future.delayed( |
| 85 new Duration(milliseconds: 10), () => echoProxy.close()); | 85 new Duration(milliseconds: 10), () => echoProxy.close()); |
| 86 }); | 86 }); |
| 87 }); | 87 }); |
| 88 } | 88 } |
| OLD | NEW |