| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'package:async_helper/async_helper.dart'; | 5 import 'package:async_helper/async_helper.dart'; |
| 6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'catch_errors.dart'; | 8 import 'catch_errors.dart'; |
| 9 | 9 |
| 10 var events = []; | 10 var events = []; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 main() { | 29 main() { |
| 30 asyncStart(); | 30 asyncStart(); |
| 31 | 31 |
| 32 // Test that body of a scheduleMicrotask goes to the zone it came from. | 32 // Test that body of a scheduleMicrotask goes to the zone it came from. |
| 33 var result = runZonedScheduleMicrotask(body, onScheduleMicrotask: handler); | 33 var result = runZonedScheduleMicrotask(body, onScheduleMicrotask: handler); |
| 34 events.add("after"); | 34 events.add("after"); |
| 35 scheduleMicrotask(() { | 35 scheduleMicrotask(() { |
| 36 scheduleMicrotask(() { | 36 scheduleMicrotask(() { |
| 37 Expect.listEquals( | 37 Expect.listEquals([ |
| 38 ["body entry", | 38 "body entry", |
| 39 "handler", "handler done", | 39 "handler", |
| 40 "after", | 40 "handler done", |
| 41 "run async body", | 41 "after", |
| 42 "handler", "handler done", | 42 "run async body", |
| 43 "run nested body"], | 43 "handler", |
| 44 events); | 44 "handler done", |
| 45 "run nested body" |
| 46 ], events); |
| 45 asyncEnd(); | 47 asyncEnd(); |
| 46 }); | 48 }); |
| 47 }); | 49 }); |
| 48 } | 50 } |
| OLD | NEW |