| Index: tests/lib_strong/async/zone_run_guarded_test.dart
|
| diff --git a/tests/lib_strong/async/zone_run_guarded_test.dart b/tests/lib_strong/async/zone_run_guarded_test.dart
|
| index e7a752090e2243d449bff5750ffb5053008c0ec7..5e34d0f26b83c4ab4a25cc2fa6b39b25e9125580 100644
|
| --- a/tests/lib_strong/async/zone_run_guarded_test.dart
|
| +++ b/tests/lib_strong/async/zone_run_guarded_test.dart
|
| @@ -13,11 +13,13 @@ main() {
|
| // runGuarded calls run, captures the synchronous error (if any) and
|
| // gives that one to handleUncaughtError.
|
|
|
| + var result;
|
| +
|
| Expect.identical(Zone.ROOT, Zone.current);
|
| Zone forked;
|
| forked = Zone.current.fork(
|
| specification: new ZoneSpecification(
|
| - run: (Zone self, ZoneDelegate parent, Zone origin, f()) {
|
| + run: <R>(Zone self, ZoneDelegate parent, Zone origin, R f()) {
|
| // The zone is still the same as when origin.run was invoked, which
|
| // is the root zone. (The origin zone hasn't been set yet).
|
| Expect.identical(Zone.ROOT, Zone.current);
|
| @@ -28,19 +30,20 @@ main() {
|
| Expect.identical(Zone.ROOT, Zone.current);
|
| Expect.identical(forked, origin);
|
| events.add("forked.handleUncaught $error");
|
| - return 499;
|
| + result = 499;
|
| }));
|
|
|
| - var result = forked.runGuarded(() {
|
| + forked.runGuarded(() {
|
| events.add("runGuarded 1");
|
| Expect.identical(forked, Zone.current);
|
| - return 42;
|
| + result = 42;
|
| });
|
| Expect.identical(Zone.ROOT, Zone.current);
|
| Expect.equals(42, result);
|
| events.add("after runGuarded 1");
|
|
|
| - result = forked.runGuarded(() {
|
| + result = null;
|
| + forked.runGuarded(() {
|
| events.add("runGuarded 2");
|
| Expect.identical(forked, Zone.current);
|
| throw 42;
|
| @@ -56,9 +59,10 @@ main() {
|
| "forked.handleUncaught 42"
|
| ], events);
|
|
|
| + result = null;
|
| events.clear();
|
| asyncStart();
|
| - result = forked.runGuarded(() {
|
| + forked.runGuarded(() {
|
| Expect.identical(forked, Zone.current);
|
| events.add("run closure");
|
| forked.scheduleMicrotask(() {
|
|
|