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

Side by Side Diff: pkg/scheduled_test/lib/src/schedule.dart

Issue 12342014: Remove deprecated ms arguments for Timer and Future. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library schedule; 5 library schedule;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:unittest/unittest.dart' as unittest;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 if (_timeoutTimer != null) _timeoutTimer.cancel(); 285 if (_timeoutTimer != null) _timeoutTimer.cancel();
286 if (_timeout == null) { 286 if (_timeout == null) {
287 _timeoutTimer = null; 287 _timeoutTimer = null;
288 } else { 288 } else {
289 _timeoutTimer = mock_clock.newTimer(_timeout, _signalTimeout); 289 _timeoutTimer = mock_clock.newTimer(_timeout, _signalTimeout);
290 } 290 }
291 } 291 }
292 292
293 /// The callback to run when the timeout timer fires. Notifies the current 293 /// The callback to run when the timeout timer fires. Notifies the current
294 /// queue that a timeout has occurred. 294 /// queue that a timeout has occurred.
295 void _signalTimeout(_) { 295 void _signalTimeout() {
296 // Reset the timer so that we can detect timeouts in the onException and 296 // Reset the timer so that we can detect timeouts in the onException and
297 // onComplete queues. 297 // onComplete queues.
298 _timeoutTimer = null; 298 _timeoutTimer = null;
299 299
300 var error = new ScheduleError.from(this, "The schedule timed out after " 300 var error = new ScheduleError.from(this, "The schedule timed out after "
301 "$_timeout of inactivity."); 301 "$_timeout of inactivity.");
302 302
303 _pendingCallbacks = 0; 303 _pendingCallbacks = 0;
304 if (_noPendingCallbacks != null) { 304 if (_noPendingCallbacks != null) {
305 var noPendingCallbacks = _noPendingCallbacks; 305 var noPendingCallbacks = _noPendingCallbacks;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 return _contents.map((task) { 470 return _contents.map((task) {
471 var lines = task.toString().split("\n"); 471 var lines = task.toString().split("\n");
472 var firstLine = task == highlight ? 472 var firstLine = task == highlight ?
473 "> ${lines.first}" : "* ${lines.first}"; 473 "> ${lines.first}" : "* ${lines.first}";
474 lines = new List.from(lines.skip(1).map((line) => "| $line")); 474 lines = new List.from(lines.skip(1).map((line) => "| $line"));
475 lines.insertRange(0, 1, firstLine); 475 lines.insertRange(0, 1, firstLine);
476 return lines.join("\n"); 476 return lines.join("\n");
477 }).join("\n"); 477 }).join("\n");
478 } 478 }
479 } 479 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698