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 'mojo:application'; | 8 import 'dart:mojo.application'; |
9 import 'mojo:bindings'; | 9 import 'dart:mojo.bindings'; |
10 import 'mojo:core'; | 10 import 'dart:mojo.core'; |
11 | 11 |
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 |
(...skipping 26 matching lines...) Expand all Loading... |
47 var v = await echoProxy.ptr.echoString(null); | 47 var v = await echoProxy.ptr.echoString(null); |
48 expect(v.value, equals(null)); | 48 expect(v.value, equals(null)); |
49 | 49 |
50 var q = await echoProxy.ptr.echoString("quit"); | 50 var q = await echoProxy.ptr.echoString("quit"); |
51 expect(q.value, equals("quit")); | 51 expect(q.value, equals("quit")); |
52 | 52 |
53 echoProxy.close(); | 53 echoProxy.close(); |
54 }); | 54 }); |
55 }); | 55 }); |
56 } | 56 } |
OLD | NEW |