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

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

Issue 15764003: Add Zone support for Timers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload 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
« no previous file with comments | « tests/lib/async/catch_errors10_test.dart ('k') | tests/lib/async/catch_errors12_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/catch_errors11_test.dart
diff --git a/tests/lib/async/catch_errors5_test.dart b/tests/lib/async/catch_errors11_test.dart
similarity index 78%
copy from tests/lib/async/catch_errors5_test.dart
copy to tests/lib/async/catch_errors11_test.dart
index 7fea08f0cfdfa33b7e30a01f1f025b569f43c8a1..d16372e6aab81dfe099e4d9fcdf35ae9828578f4 100644
--- a/tests/lib/async/catch_errors5_test.dart
+++ b/tests/lib/async/catch_errors11_test.dart
@@ -8,15 +8,14 @@ import 'dart:isolate';
main() {
// We keep a ReceivePort open until all tests are done. This way the VM will
- // time out if the callbacks are not invoked.
+ // hang if the callbacks are not invoked and the test will time out.
var port = new ReceivePort();
var events = [];
- // Test that synchronous *and* asynchronous errors are caught by
- // `catchErrors`.
+ // Test that `catchErrors` catches errors that are delayed by `Timer.run`.
catchErrors(() {
events.add("catch error entry");
new Future.error("future error");
- throw "catch error";
+ Timer.run(() { throw "timer error"; });
}).listen((x) {
events.add(x);
},
@@ -24,8 +23,8 @@ main() {
Expect.listEquals([
"catch error entry",
"main exit",
- "catch error",
"future error",
+ "timer error",
],
events);
port.close();
« no previous file with comments | « tests/lib/async/catch_errors10_test.dart ('k') | tests/lib/async/catch_errors12_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698