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

Side by Side Diff: pkg/analysis_server/test/services/completion/completion_computer_test.dart

Issue 1413963002: (TBR) update test to run with new task model (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 test.services.completion.suggestion; 5 library test.services.completion.suggestion;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 resolveLibrary(); 106 resolveLibrary();
107 break; 107 break;
108 default: 108 default:
109 fail('unexpected'); 109 fail('unexpected');
110 } 110 }
111 }, onDone: () { 111 }, onDone: () {
112 done = true; 112 done = true;
113 // There is only one notification 113 // There is only one notification
114 expect(count, equals(1)); 114 expect(count, equals(1));
115 }); 115 });
116 return pumpEventQueue().then((_) { 116 return pumpEventQueue(150).then((_) {
117 expect(done, isTrue); 117 expect(done, isTrue);
118 }); 118 });
119 } 119 }
120 120
121 test_compute_fastOnly() { 121 test_compute_fastOnly() {
122 contributor1 = new MockCompletionContributor(suggestion1, null); 122 contributor1 = new MockCompletionContributor(suggestion1, null);
123 contributor2 = new MockCompletionContributor(suggestion2, null); 123 contributor2 = new MockCompletionContributor(suggestion2, null);
124 manager.contributors = [contributor1, contributor2]; 124 manager.contributors = [contributor1, contributor2];
125 int count = 0; 125 int count = 0;
126 bool done = false; 126 bool done = false;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 @override 198 @override
199 Future<bool> computeFull(DartCompletionRequest request) { 199 Future<bool> computeFull(DartCompletionRequest request) {
200 this.request = request; 200 this.request = request;
201 fullCount++; 201 fullCount++;
202 if (fullSuggestion != null) { 202 if (fullSuggestion != null) {
203 request.addSuggestion(fullSuggestion); 203 request.addSuggestion(fullSuggestion);
204 } 204 }
205 return new Future.value(fullSuggestion != null); 205 return new Future.value(fullSuggestion != null);
206 } 206 }
207 } 207 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698