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

Unified Diff: lib/src/backend/live_test_controller.dart

Issue 1469863005: Add JSON protocol support for groups. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/backend/live_test.dart ('k') | lib/src/backend/test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/live_test_controller.dart
diff --git a/lib/src/backend/live_test_controller.dart b/lib/src/backend/live_test_controller.dart
index f562c8e68f86416ebee73cecaad1757fca60f5d9..73cfa6d6d3a984e784bc83287d77c785c9ff5b8c 100644
--- a/lib/src/backend/live_test_controller.dart
+++ b/lib/src/backend/live_test_controller.dart
@@ -9,6 +9,7 @@ import 'dart:collection';
import 'package:stack_trace/stack_trace.dart';
+import 'group.dart';
import 'live_test.dart';
import 'state.dart';
import 'suite.dart';
@@ -20,6 +21,8 @@ class _LiveTest extends LiveTest {
Suite get suite => _controller._suite;
+ List<Group> get groups => _controller._groups;
+
Test get test => _controller._test;
State get state => _controller._state;
@@ -59,6 +62,9 @@ class LiveTestController {
/// The test suite that's running [this].
final Suite _suite;
+ /// The groups containing [this].
+ final List<Group> _groups;
+
/// The test that's being run.
final Test _test;
@@ -118,9 +124,17 @@ class LiveTestController {
/// called. It should clean up any resources that have been allocated for the
/// test and ensure that the test finishes quickly if it's still running. It
/// will only be called if [onRun] has been called first.
- LiveTestController(this._suite, this._test, void onRun(), void onClose())
- : _onRun = onRun,
- _onClose = onClose {
+ ///
+ /// If [groups] is passed, it's used to populate the list of groups that
+ /// contain this test. Otherwise, `suite.group` is used.
+ LiveTestController(Suite suite, this._test, void onRun(), void onClose(),
+ {Iterable<Group> groups})
+ : _suite = suite,
+ _onRun = onRun,
+ _onClose = onClose,
+ _groups = groups == null
+ ? [suite.group]
+ : new List.unmodifiable(groups) {
_liveTest = new _LiveTest(this);
}
« no previous file with comments | « lib/src/backend/live_test.dart ('k') | lib/src/backend/test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698