| Index: tests/lib/async/run_zoned7_test.dart
|
| diff --git a/tests/lib/async/catch_errors28_test.dart b/tests/lib/async/run_zoned7_test.dart
|
| similarity index 85%
|
| copy from tests/lib/async/catch_errors28_test.dart
|
| copy to tests/lib/async/run_zoned7_test.dart
|
| index a5ce19e1270c89291333580070da82118a7f13b2..3bd3dbbbec9f0ec869c9f2ca77a11f824c079c6f 100644
|
| --- a/tests/lib/async/catch_errors28_test.dart
|
| +++ b/tests/lib/async/run_zoned7_test.dart
|
| @@ -5,24 +5,22 @@
|
| import "package:expect/expect.dart";
|
| import 'dart:async';
|
| import 'dart:isolate';
|
| +import 'catch_errors.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();
|
| var events = [];
|
| - // Test that periodic Timers are handled correctly by `catchErrors`.
|
| - catchErrors(() {
|
| + // Test runZoned with periodic Timers.
|
| + runZonedExperimental(() {
|
| int counter = 0;
|
| new Timer.periodic(const Duration(milliseconds: 50), (timer) {
|
| if (counter == 5) timer.cancel();
|
| counter++;
|
| events.add(counter);
|
| });
|
| - }).listen((x) {
|
| - events.add(x);
|
| - },
|
| - onDone: () {
|
| + }, onDone: () {
|
| Expect.listEquals([
|
| "main exit",
|
| 1, 2, 3, 4, 5, 6,
|
|
|