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

Side by Side Diff: tests/standalone/src/io/MultipleTimerTest.dart

Issue 9597015: Update Timer API to take the callback as the last parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « samples/socket/SocketExample.dart ('k') | tests/standalone/src/io/SocketCloseTest.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #import("dart:io"); 5 #import("dart:io");
6 6
7 class MultipleTimerTest { 7 class MultipleTimerTest {
8 8
9 static final int TIMEOUT1 = 1000; 9 static final int TIMEOUT1 = 1000;
10 static final int TIMEOUT2 = 2000; 10 static final int TIMEOUT2 = 2000;
11 static final int TIMEOUT3 = 500; 11 static final int TIMEOUT3 = 500;
(...skipping 30 matching lines...) Expand all
42 } 42 }
43 43
44 _order = new List<int>(4); 44 _order = new List<int>(4);
45 _order[0] = 2; 45 _order[0] = 2;
46 _order[1] = 0; 46 _order[1] = 0;
47 _order[2] = 3; 47 _order[2] = 3;
48 _order[3] = 1; 48 _order[3] = 1;
49 _message = 0; 49 _message = 0;
50 50
51 _startTime1 = (new Date.now()).value; 51 _startTime1 = (new Date.now()).value;
52 new Timer(timeoutHandler1, TIMEOUT1); 52 new Timer(TIMEOUT1, timeoutHandler1);
53 _startTime2 = (new Date.now()).value; 53 _startTime2 = (new Date.now()).value;
54 new Timer(timeoutHandler2, TIMEOUT2); 54 new Timer(TIMEOUT2, timeoutHandler2);
55 _startTime3 = (new Date.now()).value; 55 _startTime3 = (new Date.now()).value;
56 new Timer(timeoutHandler3, TIMEOUT3); 56 new Timer(TIMEOUT3, timeoutHandler3);
57 _startTime4 = (new Date.now()).value; 57 _startTime4 = (new Date.now()).value;
58 new Timer(timeoutHandler4, TIMEOUT4); 58 new Timer(TIMEOUT4, timeoutHandler4);
59 } 59 }
60 60
61 static void testMain() { 61 static void testMain() {
62 testMultipleTimer(); 62 testMultipleTimer();
63 } 63 }
64 64
65 static int _startTime1; 65 static int _startTime1;
66 static int _startTime2; 66 static int _startTime2;
67 static int _startTime3; 67 static int _startTime3;
68 static int _startTime4; 68 static int _startTime4;
69 static List<int> _order; 69 static List<int> _order;
70 static int _message; 70 static int _message;
71 } 71 }
72 72
73 main() { 73 main() {
74 MultipleTimerTest.testMain(); 74 MultipleTimerTest.testMain();
75 } 75 }
OLDNEW
« no previous file with comments | « samples/socket/SocketExample.dart ('k') | tests/standalone/src/io/SocketCloseTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698