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

Side by Side Diff: pkg/analysis_server/test/mocks.dart

Issue 629043002: Remove from AnalysisServer the 'test_' methods which now has non-test implementations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | « pkg/analysis_server/test/domain_analysis_test.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 mocks; 5 library mocks;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 @MirrorsUsed(targets: 'mocks', override: '*') 10 @MirrorsUsed(targets: 'mocks', override: '*')
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // would therefore not wait for microtask callbacks that are scheduled after 54 // would therefore not wait for microtask callbacks that are scheduled after
55 // invoking this method. 55 // invoking this method.
56 return new Future.delayed(Duration.ZERO, () => pumpEventQueue(times - 1)); 56 return new Future.delayed(Duration.ZERO, () => pumpEventQueue(times - 1));
57 } 57 }
58 58
59 /** 59 /**
60 * Returns a [Future] that completes when the given [AnalysisServer] finished 60 * Returns a [Future] that completes when the given [AnalysisServer] finished
61 * all its scheduled tasks. 61 * all its scheduled tasks.
62 */ 62 */
63 Future waitForServerOperationsPerformed(AnalysisServer server) { 63 Future waitForServerOperationsPerformed(AnalysisServer server) {
64 if (server.test_areOperationsFinished()) { 64 if (server.isAnalysisComplete()) {
65 return new Future.value(); 65 return new Future.value();
66 } 66 }
67 // We use a delayed future to allow microtask events to finish. The 67 // We use a delayed future to allow microtask events to finish. The
68 // Future.value or Future() constructors use scheduleMicrotask themselves and 68 // Future.value or Future() constructors use scheduleMicrotask themselves and
69 // would therefore not wait for microtask callbacks that are scheduled after 69 // would therefore not wait for microtask callbacks that are scheduled after
70 // invoking this method. 70 // invoking this method.
71 return new Future.delayed(Duration.ZERO, 71 return new Future.delayed(Duration.ZERO,
72 () => waitForServerOperationsPerformed(server)); 72 () => waitForServerOperationsPerformed(server));
73 } 73 }
74 74
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 StringTypedMock(this._toString); 498 StringTypedMock(this._toString);
499 499
500 @override 500 @override
501 String toString() { 501 String toString() {
502 if (_toString != null) { 502 if (_toString != null) {
503 return _toString; 503 return _toString;
504 } 504 }
505 return super.toString(); 505 return super.toString();
506 } 506 }
507 } 507 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/domain_analysis_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698