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

Unified Diff: tests/lib/async/intercept_run_async1_test.dart

Issue 17672002: Add runAsync interceptor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove isolate import. Created 7 years, 6 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: tests/lib/async/intercept_run_async1_test.dart
diff --git a/tests/lib/async/run_zoned1_test.dart b/tests/lib/async/intercept_run_async1_test.dart
similarity index 57%
copy from tests/lib/async/run_zoned1_test.dart
copy to tests/lib/async/intercept_run_async1_test.dart
index 71af2346c69ce7add4f4f8c5b030b2ca02385c73..1656001250cd5189ee210d734559031d1fabae3d 100644
--- a/tests/lib/async/run_zoned1_test.dart
+++ b/tests/lib/async/intercept_run_async1_test.dart
@@ -6,6 +6,10 @@ import "package:expect/expect.dart";
import 'dart:async';
main() {
- // Make sure `runZoned` returns the result of a synchronous call.
- Expect.equals(499, runZonedExperimental(() => 499));
+ // Test that runZoned returns the result of executing the body.
+ var result = runZonedExperimental(() => 499,
+ onRunAsync: (f) {
+ throw "Unexpected invocation.";
Lasse Reichstein Nielsen 2013/06/26 09:24:29 Expect.fail("Unexpected invocation."); You import
floitsch 2013/06/26 12:22:56 Done.
+ });
+ Expect.equals(499, result);
}

Powered by Google App Engine
This is Rietveld 408576698