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: client/testing/unittest/shared.dart

Issue 8905021: Dartest CL - Please review (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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
Index: client/testing/unittest/shared.dart
===================================================================
--- client/testing/unittest/shared.dart (revision 2358)
+++ client/testing/unittest/shared.dart (working copy)
@@ -11,6 +11,12 @@
/** Tests executed in this suite. */
List<TestCase> _tests;
+/**
+ * Callback used to run tests. Entrypoints can replace this with their own
+ * if they want.
+ */
+Function _testRunner;
+
/** Whether this is run within dartium layout tests. */
bool _isLayoutTest = false;
@@ -138,7 +144,7 @@
(_state != _RUNNING_TEST)) {
testCase.pass();
_currentTest++;
- _nextBatch();
+ _testRunner();
}
}
@@ -152,7 +158,7 @@
_platformDefer(() {
assert (_currentTest == 0);
- _nextBatch();
+ _testRunner();
});
}
@@ -237,7 +243,8 @@
_tests = <TestCase>[];
_currentGroup = '';
_state = _READY;
-
+ _testRunner = _nextBatch;
+
_platformInitialize();
// Immediately queue the suite up. It will run after a timeout (i.e. after
@@ -327,9 +334,13 @@
/** Stack trace associated with this test, or null if it succeeded. */
String stackTrace;
+
+ Date startTime;
+
+ Duration runningTime;
TestCase(this.id, this.description, this.test, this.callbacks);
-
+
bool get isComplete() => result != null;
void pass() {

Powered by Google App Engine
This is Rietveld 408576698