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

Side by Side Diff: samples/tests/samples/swarm/swarm_test.dart

Issue 12253011: Reapply remove setInterval. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
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 library swarm_tests; 5 library swarm_tests;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:async';
8 import '../../../swarm/swarmlib.dart'; 9 import '../../../swarm/swarmlib.dart';
9 import '../../../swarm/swarm_ui_lib/base/base.dart'; 10 import '../../../swarm/swarm_ui_lib/base/base.dart';
10 import '../../../swarm/swarm_ui_lib/view/view.dart'; 11 import '../../../swarm/swarm_ui_lib/view/view.dart';
11 import '../../../swarm/swarm_ui_lib/util/utilslib.dart'; 12 import '../../../swarm/swarm_ui_lib/util/utilslib.dart';
12 import '../../../../pkg/unittest/lib/unittest.dart'; 13 import '../../../../pkg/unittest/lib/unittest.dart';
13 import '../../../../pkg/unittest/lib/html_config.dart'; 14 import '../../../../pkg/unittest/lib/html_config.dart';
14 15
15 // TODO(jmesserly): these would probably be easier to debug if they were written 16 // TODO(jmesserly): these would probably be easier to debug if they were written
16 // in the WebKit layout test style, so we could easy compare that the DOM is 17 // in the WebKit layout test style, so we could easy compare that the DOM is
17 // what we expect it to be after performing some simulated user actions. 18 // what we expect it to be after performing some simulated user actions.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 143 }
143 144
144 void _serialInvokeAsync(List closures) { 145 void _serialInvokeAsync(List closures) {
145 final length = closures.length; 146 final length = closures.length;
146 if (length > 0) { 147 if (length > 0) {
147 int i = 0; 148 int i = 0;
148 void invokeNext() { 149 void invokeNext() {
149 closures[i](); 150 closures[i]();
150 i++; 151 i++;
151 if (i < length) { 152 if (i < length) {
152 window.setTimeout(expectAsync0(invokeNext), 0); 153 Timer.run(expectAsync0(invokeNext));
153 } 154 }
154 } 155 }
155 window.setTimeout(expectAsync0(invokeNext), 0); 156 Timer.run(expectAsync0(invokeNext));
156 } 157 }
157 } 158 }
OLDNEW
« no previous file with comments | « samples/tests/samples/lib/layout/layout_test.dart ('k') | samples/third_party/dromaeo/Dromaeo.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698