| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library test.integration.analysis; | 5 library test.integration.analysis; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 */ | 636 */ |
| 637 final HashMap<String, Completer> _pendingCommands = <String, Completer>{}; | 637 final HashMap<String, Completer> _pendingCommands = <String, Completer>{}; |
| 638 | 638 |
| 639 /** | 639 /** |
| 640 * Number which should be used to compute the 'id' to send in the next command | 640 * Number which should be used to compute the 'id' to send in the next command |
| 641 * sent to the server. | 641 * sent to the server. |
| 642 */ | 642 */ |
| 643 int _nextId = 0; | 643 int _nextId = 0; |
| 644 | 644 |
| 645 /** | 645 /** |
| 646 * [StreamController] to which notifications will be sent. | |
| 647 */ | |
| 648 final StreamController _notifications = new StreamController(); | |
| 649 | |
| 650 /** | |
| 651 * Messages which have been exchanged with the server; we buffer these | 646 * Messages which have been exchanged with the server; we buffer these |
| 652 * up until the test finishes, so that they can be examined in the debugger | 647 * up until the test finishes, so that they can be examined in the debugger |
| 653 * or printed out in response to a call to [debugStdio]. | 648 * or printed out in response to a call to [debugStdio]. |
| 654 */ | 649 */ |
| 655 final List<String> _recordedStdio = <String>[]; | 650 final List<String> _recordedStdio = <String>[]; |
| 656 | 651 |
| 657 /** | 652 /** |
| 658 * True if we are currently printing out messages exchanged with the server. | 653 * True if we are currently printing out messages exchanged with the server. |
| 659 */ | 654 */ |
| 660 bool _debuggingStdio = false; | 655 bool _debuggingStdio = false; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 */ | 866 */ |
| 872 void _recordStdio(String line) { | 867 void _recordStdio(String line) { |
| 873 double elapsedTime = _time.elapsedTicks / _time.frequency; | 868 double elapsedTime = _time.elapsedTicks / _time.frequency; |
| 874 line = "$elapsedTime: $line"; | 869 line = "$elapsedTime: $line"; |
| 875 if (_debuggingStdio) { | 870 if (_debuggingStdio) { |
| 876 print(line); | 871 print(line); |
| 877 } | 872 } |
| 878 _recordedStdio.add(line); | 873 _recordedStdio.add(line); |
| 879 } | 874 } |
| 880 } | 875 } |
| OLD | NEW |