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

Unified Diff: tests/isolate/timer_cancel1_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/isolate/multiple_timer_test.dart ('k') | tests/isolate/timer_cancel2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/timer_cancel1_test.dart
diff --git a/tests/isolate/timer_cancel1_test.dart b/tests/isolate/timer_cancel1_test.dart
index efcbbe8cb1816ad7e7bc36b49cd6f8bb3180a4d0..61bb5dd7409c22cb8a072f6da9db04c57ce0c0bd 100644
--- a/tests/isolate/timer_cancel1_test.dart
+++ b/tests/isolate/timer_cancel1_test.dart
@@ -12,15 +12,17 @@ main() {
var canceleeTimer;
var cancelerTimer;
- void unreachable(Timer timer) {
+ void unreachable() {
fail("A canceled timeout handler should be unreachable.");
}
- void handler(Timer timer) {
+ void handler() {
canceleeTimer.cancel();
}
- cancelerTimer = new Timer(1, expectAsync1(handler));
- canceleeTimer = new Timer(1000, expectAsync1(unreachable, count: 0));
+ cancelerTimer = new Timer(const Duration(milliseconds: 1),
+ expectAsync0(handler));
+ canceleeTimer = new Timer(const Duration(milliseconds: 1000),
+ expectAsync0(unreachable, count: 0));
});
}
« no previous file with comments | « tests/isolate/multiple_timer_test.dart ('k') | tests/isolate/timer_cancel2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698