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

Unified Diff: lib/src/runner/load_suite.dart

Issue 1496683003: Add RunnerSuite.{on,is}Debugging properties. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years 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/runner/browser/suite.dart ('k') | lib/src/runner/runner_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/load_suite.dart
diff --git a/lib/src/runner/load_suite.dart b/lib/src/runner/load_suite.dart
index cb84a0b5121ee73be5211249f04013de2bc69c7d..74f25f7ad971ca0ead99ae916f5d7b363e2b19c6 100644
--- a/lib/src/runner/load_suite.dart
+++ b/lib/src/runner/load_suite.dart
@@ -12,6 +12,7 @@ import '../../test.dart';
import '../backend/group.dart';
import '../backend/invoker.dart';
import '../backend/metadata.dart';
+import '../backend/suite.dart';
import '../backend/test.dart';
import '../backend/test_platform.dart';
import '../utils.dart';
@@ -33,7 +34,11 @@ import 'vm/environment.dart';
/// a normal test body, this logic isn't run until [LiveTest.run] is called. The
/// suite itself is returned by [suite] once it's avaialble, but any errors or
/// prints will be emitted through the running [LiveTest].
-class LoadSuite extends RunnerSuite {
+class LoadSuite extends Suite implements RunnerSuite {
+ final environment = const VMEnvironment();
+ final isDebugging = false;
+ final onDebugging = new StreamController<bool>().stream;
+
/// A future that completes to the loaded suite once the suite's test has been
/// run and completed successfully.
///
@@ -77,7 +82,8 @@ class LoadSuite extends RunnerSuite {
return;
}
- completer.complete(new Pair(suite, Zone.current));
+ completer.complete(
+ suite == null ? null : new Pair(suite, Zone.current));
invoker.removeOutstandingCallback();
} catch (error, stackTrace) {
registerException(error, stackTrace);
@@ -115,7 +121,7 @@ class LoadSuite extends RunnerSuite {
LoadSuite._(String name, void body(), this._suiteAndZone,
{TestPlatform platform})
- : super(const VMEnvironment(), new Group.root([
+ : super(new Group.root([
new LocalTest(name,
new Metadata(timeout: new Timeout(new Duration(minutes: 5))),
body)
@@ -123,7 +129,7 @@ class LoadSuite extends RunnerSuite {
/// A constructor used by [changeSuite].
LoadSuite._changeSuite(LoadSuite old, this._suiteAndZone)
- : super(const VMEnvironment(), old.group, platform: old.platform);
+ : super(old.group, platform: old.platform);
/// Creates a new [LoadSuite] that's identical to this one, but that
/// transforms [suite] once it's loaded.
@@ -136,7 +142,8 @@ class LoadSuite extends RunnerSuite {
if (pair == null) return null;
var zone = pair.last;
- return new Pair(zone.runUnaryGuarded(change, pair.first), zone);
+ var newSuite = zone.runUnaryGuarded(change, pair.first);
+ return newSuite == null ? null : new Pair(newSuite, zone);
}));
}
@@ -155,4 +162,6 @@ class LoadSuite extends RunnerSuite {
await new Future.error(error.error, error.stackTrace);
throw 'unreachable';
}
+
+ Future close() async {}
}
« no previous file with comments | « lib/src/runner/browser/suite.dart ('k') | lib/src/runner/runner_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698