Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(701)

Side by Side Diff: lib/src/runner/remote_listener.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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/runner/load_suite.dart ('k') | lib/src/runner/reporter/compact.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:stream_channel/stream_channel.dart'; 7 import 'package:stream_channel/stream_channel.dart';
8 8
9 import '../backend/declarer.dart'; 9 import '../backend/declarer.dart';
10 import '../backend/group.dart'; 10 import '../backend/group.dart';
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 }); 176 });
177 177
178 liveTest.onError.listen((asyncError) { 178 liveTest.onError.listen((asyncError) {
179 channel.sink.add({ 179 channel.sink.add({
180 "type": "error", 180 "type": "error",
181 "error": RemoteException.serialize( 181 "error": RemoteException.serialize(
182 asyncError.error, asyncError.stackTrace) 182 asyncError.error, asyncError.stackTrace)
183 }); 183 });
184 }); 184 });
185 185
186 liveTest.onPrint.listen((line) { 186 liveTest.onMessage.listen((message) {
187 if (_printZone != null) _printZone.print(line); 187 if (_printZone != null) _printZone.print(message.text);
188 channel.sink.add({"type": "print", "line": line}); 188 channel.sink.add({
189 "type": "message",
190 "message-type": message.type.name,
191 "text": message.text
192 });
189 }); 193 });
190 194
191 liveTest.run().then((_) => channel.sink.add({"type": "complete"})); 195 liveTest.run().then((_) => channel.sink.add({"type": "complete"}));
192 } 196 }
193 } 197 }
OLDNEW
« no previous file with comments | « lib/src/runner/load_suite.dart ('k') | lib/src/runner/reporter/compact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698