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

Unified Diff: tests/lib_strong/async/run_zoned6_test.dart

Issue 2893893002: Use generic functions in zones. (Closed)
Patch Set: Fix more tests. Created 3 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 | « tests/lib_strong/async/future_timeout_test.dart ('k') | tests/lib_strong/async/run_zoned9_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib_strong/async/run_zoned6_test.dart
diff --git a/tests/lib_strong/async/run_zoned6_test.dart b/tests/lib_strong/async/run_zoned6_test.dart
index 491a9391166b6d736d876637a785e5765db0fe54..906c776f3d6d91a7b28428fe59ea0bb38b0a3e38 100644
--- a/tests/lib_strong/async/run_zoned6_test.dart
+++ b/tests/lib_strong/async/run_zoned6_test.dart
@@ -8,20 +8,19 @@ import 'package:async_helper/async_helper.dart';
main() {
asyncStart();
- // Ensure that `runZoned`'s onError handles synchronous errors but delegates
- // to the top-level when the handler returns false.
+ // Ensure that `runZoned`'s onError handles synchronous errors, and throwing
+ // in the error handler at that point (when it is a synchronous error) yields
+ // a synchronous error.
try {
runZoned(() {
throw 0;
}, onError: (e) {
Expect.equals(0, e);
- if (false) //# 01: runtime error
+ throw e; //#01 : ok
asyncEnd();
- throw e; //# 01: runtime error
});
} catch (e) {
- // We should never see an error here.
- if (false) //# 01: continued
+ asyncEnd(); return; //# 01: continued
rethrow;
}
}
« no previous file with comments | « tests/lib_strong/async/future_timeout_test.dart ('k') | tests/lib_strong/async/run_zoned9_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698