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

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

Issue 1233003002: Only send "analysis.analyzedFiles" notification when the set of files changes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | « pkg/analysis_server/test/analysis/notification_analyzedFiles_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 test.domain.analysis.abstract; 5 library test.domain.analysis.abstract;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/constants.dart'; 10 import 'package:analysis_server/src/constants.dart';
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return testFile; 149 return testFile;
150 } 150 }
151 151
152 void processNotification(Notification notification) { 152 void processNotification(Notification notification) {
153 if (notification.event == SERVER_ERROR) { 153 if (notification.event == SERVER_ERROR) {
154 var params = new ServerErrorParams.fromNotification(notification); 154 var params = new ServerErrorParams.fromNotification(notification);
155 serverErrors.add(params); 155 serverErrors.add(params);
156 } 156 }
157 } 157 }
158 158
159 void removeGeneralAnalysisSubscription(GeneralAnalysisService service) {
160 generalServices.remove(service);
161 Request request = new AnalysisSetGeneralSubscriptionsParams(generalServices)
162 .toRequest('0');
163 handleSuccessfulRequest(request);
164 }
165
159 void setUp() { 166 void setUp() {
160 serverChannel = new MockServerChannel(); 167 serverChannel = new MockServerChannel();
161 resourceProvider = new MemoryResourceProvider(); 168 resourceProvider = new MemoryResourceProvider();
162 packageMapProvider = new MockPackageMapProvider(); 169 packageMapProvider = new MockPackageMapProvider();
163 Index index = createIndex(); 170 Index index = createIndex();
164 server = createAnalysisServer(index); 171 server = createAnalysisServer(index);
165 handler = new AnalysisDomainHandler(server); 172 handler = new AnalysisDomainHandler(server);
166 // listen for notifications 173 // listen for notifications
167 Stream<Notification> notificationStream = 174 Stream<Notification> notificationStream =
168 serverChannel.notificationController.stream; 175 serverChannel.notificationController.stream;
(...skipping 18 matching lines...) Expand all
187 } 194 }
188 195
189 /** 196 /**
190 * Completes with a successful [Response] for the given [request]. 197 * Completes with a successful [Response] for the given [request].
191 * Otherwise fails. 198 * Otherwise fails.
192 */ 199 */
193 Future<Response> waitResponse(Request request) async { 200 Future<Response> waitResponse(Request request) async {
194 return serverChannel.sendRequest(request); 201 return serverChannel.sendRequest(request);
195 } 202 }
196 } 203 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698