Chromium Code Reviews

Side by Side Diff: test/runner/browser/loader_test.dart

Issue 2091173002: Add metadata to messages emitted by live tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « test/backend/invoker_test.dart ('k') | test/runner/compact_reporter_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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...)
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 }
OLDNEW
« no previous file with comments | « test/backend/invoker_test.dart ('k') | test/runner/compact_reporter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine