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

Unified Diff: tests/compiler/dart2js_extra/timer_test.dart

Issue 12213092: Rework Timer interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js_extra/timer_negative_test.dart ('k') | tests/html/dromaeo_smoke_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_extra/timer_test.dart
diff --git a/tests/compiler/dart2js_extra/timer_test.dart b/tests/compiler/dart2js_extra/timer_test.dart
index 411be084d63d1c2651f3971d3d18386bea0cfc66..818a6aef2f7c41c0b0ca05a8119a37ecc6df1088 100644
--- a/tests/compiler/dart2js_extra/timer_test.dart
+++ b/tests/compiler/dart2js_extra/timer_test.dart
@@ -8,16 +8,17 @@ import 'dart:isolate';
import 'async_helper.dart';
void test(void onDone(bool success)) {
+ Duration ms = const Duration(milliseconds: 1);
int expected = 4;
- void timerCallback(timer) {
+ void timerCallback() {
if (--expected == 0) onDone(true);
}
- new Timer(0, timerCallback);
- new Timer(10, timerCallback);
- new Timer(100, timerCallback);
- new Timer(1000, timerCallback);
+ new Timer(ms * 0, timerCallback);
+ new Timer(ms * 10, timerCallback);
+ new Timer(ms * 100, timerCallback);
+ new Timer(ms * 1000, timerCallback);
}
main() {
« no previous file with comments | « tests/compiler/dart2js_extra/timer_negative_test.dart ('k') | tests/html/dromaeo_smoke_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698