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

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

Issue 23694002: Fix run_zoned6|9_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test. 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
Index: tests/lib/async/run_zoned9_test.dart
diff --git a/tests/lib/async/run_zoned9_test.dart b/tests/lib/async/run_zoned9_test.dart
index aeaee5dfa41e24b4f82887d177a0087b7270dfe2..5ba8de2d6fb0b6c66c4241146e4f693b64f31f6c 100644
--- a/tests/lib/async/run_zoned9_test.dart
+++ b/tests/lib/async/run_zoned9_test.dart
@@ -4,12 +4,10 @@
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 next runZonedExperimental when the handler returns false.
bool sawInnerHandler = false;
@@ -24,7 +22,7 @@ main() {
}, onError: (e) {
Expect.equals(0, e);
Expect.isTrue(sawInnerHandler);
- port.close();
+ asyncEnd();
throw e; /// 01: runtime error
});
} catch (e) {
« no previous file with comments | « tests/lib/async/run_zoned6_test.dart ('k') | tests/lib/lib.status » ('j') | tests/lib/lib.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698