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

Unified Diff: client/testing/unittest/unittestsuite.dart

Issue 8363040: Implement measurement using futures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to all comments Created 9 years, 2 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: client/testing/unittest/unittestsuite.dart
diff --git a/client/testing/unittest/unittestsuite.dart b/client/testing/unittest/unittestsuite.dart
index fde5b2e39d0fd06f4233c3851e1777caa0e841f1..3368d4655de2e05eeb347e1e2f1f5fd9f894e1e5 100644
--- a/client/testing/unittest/unittestsuite.dart
+++ b/client/testing/unittest/unittestsuite.dart
@@ -305,6 +305,21 @@ void asyncTest(String spec, int callbacks, TestFunction body) {
}
}
+void serialInvokeAsync(List closures) {
+ final length = closures.length;
+ if (length > 0) {
nweiz 2011/10/28 03:58:38 Style nit: if (length == 0) return;
Jacob 2011/10/31 22:09:50 For this case i think the code is slightly easier
+ int i = 0;
+ void invokeNext() {
+ closures[i]();
+ i++;
+ if (i < length) {
+ window.setTimeout(invokeNext, 0);
+ }
+ }
+ window.setTimeout(invokeNext, 0);
+ }
+}
+
/**
* Creates a new named group of tests. Calls to group() or test() within the
* body of the function passed to this will inherit this group's description.

Powered by Google App Engine
This is Rietveld 408576698