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

Unified Diff: dart/tests/light_unittest.dart

Issue 23537006: Small fix in tests/light_unittest.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/light_unittest.dart
diff --git a/dart/tests/light_unittest.dart b/dart/tests/light_unittest.dart
index 02ed4332240f94b2b46f48a0c7d1ad7e810bdc99..d47919f6ea541a212d7c8f0ab75701fb03538b17 100644
--- a/dart/tests/light_unittest.dart
+++ b/dart/tests/light_unittest.dart
@@ -59,7 +59,10 @@ get isTrue => new Expectation((actual) => Expect.isTrue(actual));
expectAsync1(then) {
asyncStart();
return (x) {
+ // 'then(x)' may call 'asyncStart()', so we first need to execute it, before
+ // we can call 'asyncEnd()'.
+ var result = then(x);
asyncEnd();
- return then(x);
+ return result;
};
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698