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

Unified Diff: tests/isolate/timer_not_available_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/timer_isolate_test.dart ('k') | tests/isolate/timer_repeat_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/timer_not_available_test.dart
diff --git a/tests/isolate/timer_not_available_test.dart b/tests/isolate/timer_not_available_test.dart
index 66330a2a3a95e7ba638724829e8c0a879e75fac4..554c91bdcd33d65996935a1d28b70ddc19e08df2 100644
--- a/tests/isolate/timer_not_available_test.dart
+++ b/tests/isolate/timer_not_available_test.dart
@@ -7,16 +7,17 @@ library timerNotAvailable;
import 'dart:async';
main() {
+ final ms = const Duration(milliseconds: 1);
bool failed = false;
try {
- new Timer(5, (_) { });
+ new Timer(ms * 5, () { });
} on UnsupportedError catch (e) {
failed = true;
}
Expect.isTrue(failed);
failed = false;
try {
- var t = new Timer.repeating(10, (_) { });
+ var t = new Timer.repeating(ms * 10, (_) { });
t.cancel();
} on UnsupportedError catch (e) {
failed = true;
« no previous file with comments | « tests/isolate/timer_isolate_test.dart ('k') | tests/isolate/timer_repeat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698