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

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

Issue 23522012: Replace ReceivePorts with asyncStart|End in some tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove bad comment. 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 | « tests/lib/async/intercept_run_async6_test.dart ('k') | tests/lib/async/run_zoned2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/run_async4_test.dart
diff --git a/tests/lib/async/run_async4_test.dart b/tests/lib/async/run_async4_test.dart
index c4a1fc173ea2502c118bee5adc2babe91e639619..26db3901e4f90ef55c249f17947e6b0d42db4a08 100644
--- a/tests/lib/async/run_async4_test.dart
+++ b/tests/lib/async/run_async4_test.dart
@@ -4,6 +4,7 @@
library run_async_test;
+import 'package:async_helper/async_helper.dart';
import 'dart:async';
import 'dart:isolate';
@@ -28,10 +29,15 @@ bool globalErrorHandler(IsolateUnhandledException e) {
}
main() {
+ asyncStart();
var port = new ReceivePort();
var timer;
SendPort otherIsolate = spawnFunction(runTest, globalErrorHandler);
otherIsolate.send(port.toSendPort());
- port.receive((msg, replyPort) { port.close(); timer.cancel(); });
+ port.receive((msg, replyPort) {
+ port.close();
+ timer.cancel();
+ asyncEnd();
+ });
timer = new Timer(const Duration(seconds: 2), () { throw "failed"; });
}
« no previous file with comments | « tests/lib/async/intercept_run_async6_test.dart ('k') | tests/lib/async/run_zoned2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698