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

Side by Side Diff: tests/lib_strong/async/zone_debug_test.dart

Issue 2893893002: Use generic functions in zones. (Closed)
Patch Set: Fix more tests. Created 3 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 unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « tests/lib_strong/async/zone_bind_callback_unary_test.dart ('k') | tests/lib_strong/async/zone_fork_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698