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

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

Issue 2612723002: Implement 'analysis.analyzedFiles' notification with the new analysis driver. (Closed)
Patch Set: Created 3 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
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/plugin/protocol/protocol.dart' 9 import 'package:analysis_server/plugin/protocol/protocol.dart'
10 hide AnalysisOptions; 10 hide AnalysisOptions;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 * Validates that the given [request] is handled successfully. 190 * Validates that the given [request] is handled successfully.
191 */ 191 */
192 Response handleSuccessfulRequest(Request request, {RequestHandler handler}) { 192 Response handleSuccessfulRequest(Request request, {RequestHandler handler}) {
193 handler ??= this.handler; 193 handler ??= this.handler;
194 Response response = handler.handleRequest(request); 194 Response response = handler.handleRequest(request);
195 expect(response, isResponseSuccess(request.id)); 195 expect(response, isResponseSuccess(request.id));
196 return response; 196 return response;
197 } 197 }
198 198
199 String modifyTestFile(String content) { 199 String modifyTestFile(String content) {
200 addFile(testFile, content); 200 String path = resourceProvider.convertPath(testFile);
201 resourceProvider.updateFile(path, content);
201 this.testCode = content; 202 this.testCode = content;
202 return testFile; 203 return testFile;
203 } 204 }
204 205
205 void processNotification(Notification notification) { 206 void processNotification(Notification notification) {
206 if (notification.event == SERVER_ERROR) { 207 if (notification.event == SERVER_ERROR) {
207 var params = new ServerErrorParams.fromNotification(notification); 208 var params = new ServerErrorParams.fromNotification(notification);
208 serverErrors.add(params); 209 serverErrors.add(params);
209 } 210 }
210 } 211 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } 251 }
251 252
252 /** 253 /**
253 * Completes with a successful [Response] for the given [request]. 254 * Completes with a successful [Response] for the given [request].
254 * Otherwise fails. 255 * Otherwise fails.
255 */ 256 */
256 Future<Response> waitResponse(Request request) async { 257 Future<Response> waitResponse(Request request) async {
257 return serverChannel.sendRequest(request); 258 return serverChannel.sendRequest(request);
258 } 259 }
259 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698