| 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 library unittest.live_test_controller; | 5 library unittest.backend.live_test_controller; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:stack_trace/stack_trace.dart'; | 10 import 'package:stack_trace/stack_trace.dart'; |
| 11 | 11 |
| 12 import '../utils.dart'; |
| 12 import 'live_test.dart'; | 13 import 'live_test.dart'; |
| 13 import 'state.dart'; | 14 import 'state.dart'; |
| 14 import 'suite.dart'; | 15 import 'suite.dart'; |
| 15 import 'test.dart'; | 16 import 'test.dart'; |
| 16 import 'utils.dart'; | |
| 17 | 17 |
| 18 /// An implementation of [LiveTest] that's controlled by a [LiveTestController]. | 18 /// An implementation of [LiveTest] that's controlled by a [LiveTestController]. |
| 19 class _LiveTest extends LiveTest { | 19 class _LiveTest extends LiveTest { |
| 20 final LiveTestController _controller; | 20 final LiveTestController _controller; |
| 21 | 21 |
| 22 Suite get suite => _controller._suite; | 22 Suite get suite => _controller._suite; |
| 23 | 23 |
| 24 Test get test => _controller._test; | 24 Test get test => _controller._test; |
| 25 | 25 |
| 26 State get state => _controller._state; | 26 State get state => _controller._state; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 Future _close() { | 146 Future _close() { |
| 147 if (_isClosed) return new Future.value(); | 147 if (_isClosed) return new Future.value(); |
| 148 _onStateChangeController.close(); | 148 _onStateChangeController.close(); |
| 149 _onErrorController.close(); | 149 _onErrorController.close(); |
| 150 if (!completer.isCompleted) completer.complete(); | 150 if (!completer.isCompleted) completer.complete(); |
| 151 | 151 |
| 152 if (_onClose != null) return new Future.sync(_onClose); | 152 if (_onClose != null) return new Future.sync(_onClose); |
| 153 return new Future.value(); | 153 return new Future.value(); |
| 154 } | 154 } |
| 155 } | 155 } |
| OLD | NEW |