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:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
6 import 'package:async_helper/async_helper.dart'; | 6 import 'package:async_helper/async_helper.dart'; |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'dart:collection'; | 9 import 'dart:collection'; |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 Expect.listEquals([fork2Trace, globalTrace], restoredStackTrace); | 109 Expect.listEquals([fork2Trace, globalTrace], restoredStackTrace); |
110 fork3Trace = stackTrace; | 110 fork3Trace = stackTrace; |
111 openTests--; | 111 openTests--; |
112 if (openTests == 0) { | 112 if (openTests == 0) { |
113 done.complete(); | 113 done.complete(); |
114 } | 114 } |
115 scheduleMicrotask(() { | 115 scheduleMicrotask(() { |
116 expectedDebugTrace = [fork3Trace, fork2Trace, globalTrace]; | 116 expectedDebugTrace = [fork3Trace, fork2Trace, globalTrace]; |
117 throw "gee"; | 117 throw "gee"; |
118 }); | 118 }); |
119 }, runGuarded: false); | 119 }); |
120 }, runGuarded: false); | 120 }); |
121 openTests++; | 121 openTests++; |
122 f(); | 122 f(); |
123 f2(); | 123 f2(); |
124 | 124 |
125 done.future.whenComplete(() { | 125 done.future.whenComplete(() { |
126 // We don't really care for the order. | 126 // We don't really care for the order. |
127 events.sort(); | 127 events.sort(); |
128 Expect.listEquals([ | 128 Expect.listEquals([ |
129 "handling uncaught error bar", | 129 "handling uncaught error bar", |
130 "handling uncaught error foo", | 130 "handling uncaught error foo", |
131 "handling uncaught error gee" | 131 "handling uncaught error gee" |
132 ], events); | 132 ], events); |
133 asyncEnd(); | 133 asyncEnd(); |
134 }); | 134 }); |
135 } | 135 } |
OLD | NEW |