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)); |
}); |
} |