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

Unified Diff: dart/pkg/unittest/config.dart

Issue 10919098: Run dart2js tests unmodified in browser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use messages Created 8 years, 3 months 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: dart/pkg/unittest/config.dart
diff --git a/dart/pkg/unittest/config.dart b/dart/pkg/unittest/config.dart
index 34693dde24f6b99fea5b0c1e0c69527979deaec2..5d53912456ad730eca511d119da0287413309db8 100644
--- a/dart/pkg/unittest/config.dart
+++ b/dart/pkg/unittest/config.dart
@@ -37,7 +37,9 @@ class Configuration {
* tell the vm or browser that tests are still running and the process should
* wait until they are done.
*/
- void onStart() {}
+ void onStart() {
+ $$postGlobalMessage('unittest-suite-wait-for-done');
ngeoffray 2012/09/10 08:51:14 As discussed, it would be nice to be able to use p
ahe 2012/09/10 10:35:59 Done.
+ }
/**
* Called when each test starts. Useful to show intermediate progress on
@@ -121,8 +123,11 @@ class Configuration {
print('$passed PASSED, $failed FAILED, $errors ERRORS');
}
- // An exception is used by the test infrastructure to detect failure.
- if (!success) throw new Exception("Some tests failed.");
+ if (success) {
+ $$postGlobalMessage('unittest-suite-success');
+ } else {
+ throw new Exception('Some tests failed.');
+ }
}
String _indent(String str) {

Powered by Google App Engine
This is Rietveld 408576698