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

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

Issue 23694002: Fix run_zoned6|9_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | tests/lib/async/run_zoned9_test.dart » ('j') | tests/lib/async/run_zoned9_test.dart » ('J')
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 2de6ca9af5045f87962b049f81e4b8c9a73e4683..45507330e9261b81826898ebd841c67f9e675853 100644
--- a/tests/lib/async/run_zoned6_test.dart
+++ b/tests/lib/async/run_zoned6_test.dart
@@ -4,19 +4,17 @@
import "package:expect/expect.dart";
import 'dart:async';
-import 'dart:isolate';
+import 'package:async_helper/async_helper.dart';
main() {
- // We keep a ReceivePort open until all tests are done. This way the VM will
- // hang if the callbacks are not invoked and the test will time out.
- var port = new ReceivePort();
+ asyncStart();
// Ensure that `runZoned`'s onError handles synchronous errors but delegates
// to the top-level when the handler returns false.
try {
runZonedExperimental(() { throw 0; },
onError: (e) {
Expect.equals(0, e);
- port.close();
+ asyncEnd();
throw e; /// 01: runtime error
});
} catch (e) {
« no previous file with comments | « no previous file | tests/lib/async/run_zoned9_test.dart » ('j') | tests/lib/async/run_zoned9_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698