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

Unified Diff: tests/dom/async_window_test.dart

Issue 10412015: aChange all asyncTest/callbackDone style tests to use the new expectAsync/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/benchmark_smoke/benchmark_smoke_test.dart ('k') | tests/dom/dom_isolates_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/dom/async_window_test.dart
===================================================================
--- tests/dom/async_window_test.dart (revision 7823)
+++ tests/dom/async_window_test.dart (working copy)
@@ -5,24 +5,24 @@
main() {
useDomConfiguration();
- asyncTest('Window.setTimeout', 1, () {
- window.setTimeout(callbackDone, 10);
+ test('Window.setTimeout', () {
+ window.setTimeout(expectAsync0((){}), 10);
});
- asyncTest('Window.setInterval', 1, () {
+ test('Window.setInterval', () {
int counter = 0;
int id = null;
- id = window.setInterval(() {
+ id = window.setInterval(expectAsync0(() {
if (counter == 3) {
counter = 1024;
window.clearInterval(id);
// Wait some more time to be sure callback won't be invoked any more.
- window.setTimeout(callbackDone, 50);
+ window.setTimeout(expectAsync0((){}), 50);
return;
}
// As callback should have been cleared on 4th invocation, counter
// should never be greater than 3.
assert(counter < 3);
counter++;
- }, 10);
+ }, 3), 10);
Siggi Cherem (dart-lang) 2012/05/22 19:50:15 style: add 'count: ' in front of 3 (since this is
});
}
« no previous file with comments | « tests/benchmark_smoke/benchmark_smoke_test.dart ('k') | tests/dom/dom_isolates_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698