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

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

Issue 2963743002: Revert "Make Zone API strong mode clean." (Closed)
Patch Set: Created 3 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
« no previous file with comments | « tests/lib/async/future_timeout_test.dart ('k') | tests/lib/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/async/run_zoned6_test.dart
diff --git a/tests/lib/async/run_zoned6_test.dart b/tests/lib/async/run_zoned6_test.dart
index 906c776f3d6d91a7b28428fe59ea0bb38b0a3e38..491a9391166b6d736d876637a785e5765db0fe54 100644
--- a/tests/lib/async/run_zoned6_test.dart
+++ b/tests/lib/async/run_zoned6_test.dart
@@ -8,19 +8,20 @@ import 'package:async_helper/async_helper.dart';
main() {
asyncStart();
- // 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.
+ // Ensure that `runZoned`'s onError handles synchronous errors but delegates
+ // to the top-level when the handler returns false.
try {
runZoned(() {
throw 0;
}, onError: (e) {
Expect.equals(0, e);
- throw e; //#01 : ok
+ if (false) //# 01: runtime error
asyncEnd();
+ throw e; //# 01: runtime error
});
} catch (e) {
- asyncEnd(); return; //# 01: continued
+ // We should never see an error here.
+ if (false) //# 01: continued
rethrow;
}
}
« no previous file with comments | « tests/lib/async/future_timeout_test.dart ('k') | tests/lib/async/run_zoned9_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698