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

Unified Diff: tests/isolate/timer_not_available_test.dart

Issue 10830230: Add Timer implementation for dart2js. Also moves tests to appropriate location. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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_cancel_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
new file mode 100644
index 0000000000000000000000000000000000000000..5a64c016c54a55e190c526d84c8454214fb62a64
--- /dev/null
+++ b/tests/isolate/timer_not_available_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#library('timer_not_available');
+
+#import("dart:isolate");
+
+main() {
+ bool failed = false;
+ try {
+ new Timer(0, (_) { });
+ } catch (UnsupportedOperationException e) {
+ failed = true;
+ }
+ Expect.isTrue(failed);
+ failed = false;
+ try {
+ var t = new Timer.repeating(10, (_) { });
+ t.cancel();
+ } catch (UnsupportedOperationException e) {
+ failed = true;
+ }
+ Expect.isTrue(failed);
+}
« no previous file with comments | « tests/isolate/timer_cancel_test.dart ('k') | tests/isolate/timer_repeat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698