| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |