OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 @TestOn("vm") | 5 @TestOn("vm") |
6 @Tags(const ["chrome"]) | 6 @Tags(const ["chrome"]) |
7 | 7 |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
(...skipping 146 matching lines...) Loading... |
157 void main() { | 157 void main() { |
158 print('print within test'); | 158 print('print within test'); |
159 } | 159 } |
160 """); | 160 """); |
161 var suites = await _loader.loadFile(p.join(_sandbox, 'a_test.dart')) | 161 var suites = await _loader.loadFile(p.join(_sandbox, 'a_test.dart')) |
162 .toList(); | 162 .toList(); |
163 expect(suites, hasLength(1)); | 163 expect(suites, hasLength(1)); |
164 var loadSuite = suites.first; | 164 var loadSuite = suites.first; |
165 | 165 |
166 var liveTest = await loadSuite.group.entries.single.load(loadSuite); | 166 var liveTest = await loadSuite.group.entries.single.load(loadSuite); |
167 expect(liveTest.onPrint.first, completion(equals("print within test"))); | 167 expect(liveTest.onMessage.first.then((message) => message.text), |
| 168 completion(equals("print within test"))); |
168 await liveTest.run(); | 169 await liveTest.run(); |
169 expectTestPassed(liveTest); | 170 expectTestPassed(liveTest); |
170 }); | 171 }); |
171 } | 172 } |
OLD | NEW |