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

Side by Side Diff: lib/src/frontend/timeout.dart

Issue 1580243002: Wait for a timed-out test's tear-down logic. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « lib/src/backend/invoker.dart ('k') | test/runner/engine_test.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 test.frontend.timeout; 5 library test.frontend.timeout;
6 6
7 /// A class representing a modification to the default timeout for a test. 7 /// A class representing a modification to the default timeout for a test.
8 /// 8 ///
9 /// By default, a test will time out after 30 seconds. With [new Timeout], that 9 /// By default, a test will time out after 30 seconds. With [new Timeout], that
10 /// can be overridden entirely; with [new Timeout.factor], it can be scaled 10 /// can be overridden entirely; with [new Timeout.factor], it can be scaled
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return new Timeout.factor(scaleFactor * other.scaleFactor); 52 return new Timeout.factor(scaleFactor * other.scaleFactor);
53 } 53 }
54 54
55 /// Returns a new [Duration] from applying [this] to [base]. 55 /// Returns a new [Duration] from applying [this] to [base].
56 /// 56 ///
57 /// If this is [none], returns `null`. 57 /// If this is [none], returns `null`.
58 Duration apply(Duration base) { 58 Duration apply(Duration base) {
59 if (this == none) return null; 59 if (this == none) return null;
60 return duration == null ? base * scaleFactor : duration; 60 return duration == null ? base * scaleFactor : duration;
61 } 61 }
62
63 String toString() {
64 if (duration != null) return duration.toString();
65 if (scaleFactor != null) return "${scaleFactor}x";
66 return "none";
67 }
62 } 68 }
OLDNEW
« no previous file with comments | « lib/src/backend/invoker.dart ('k') | test/runner/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698