OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 | 5 |
6 library dartcombat_tests; | 6 library dartcombat_tests; |
7 | 7 |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
10 import 'dart:async'; | 10 import 'dart:async'; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 | 165 |
166 void _serialInvokeAsync(List closures) { | 166 void _serialInvokeAsync(List closures) { |
167 final length = closures.length; | 167 final length = closures.length; |
168 if (length > 0) { | 168 if (length > 0) { |
169 int i = 0; | 169 int i = 0; |
170 void invokeNext() { | 170 void invokeNext() { |
171 closures[i](); | 171 closures[i](); |
172 i++; | 172 i++; |
173 if (i < length) { | 173 if (i < length) { |
174 window.setTimeout(expectAsync0(invokeNext), 0); | 174 Timer.run(expectAsync0(invokeNext)); |
175 } | 175 } |
176 } | 176 } |
177 window.setTimeout(expectAsync0(invokeNext), 0); | 177 Timer.run(expectAsync0(invokeNext)); |
178 } | 178 } |
179 } | 179 } |
OLD | NEW |