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

Side by Side Diff: pkg/analyzer_plugin/test/plugin/plugin_test.dart

Issue 2964113003: Remove an unused request and the associated type (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:analyzer/file_system/file_system.dart'; 5 import 'package:analyzer/file_system/file_system.dart';
6 import 'package:analyzer/file_system/memory_file_system.dart'; 6 import 'package:analyzer/file_system/memory_file_system.dart';
7 import 'package:analyzer/src/dart/analysis/driver.dart'; 7 import 'package:analyzer/src/dart/analysis/driver.dart';
8 import 'package:analyzer_plugin/protocol/protocol.dart'; 8 import 'package:analyzer_plugin/protocol/protocol.dart';
9 import 'package:analyzer_plugin/protocol/protocol_common.dart'; 9 import 'package:analyzer_plugin/protocol/protocol_common.dart';
10 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; 10 import 'package:analyzer_plugin/protocol/protocol_generated.dart';
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 test_handleAnalysisReanalyze_subset() async { 93 test_handleAnalysisReanalyze_subset() async {
94 await plugin.handleAnalysisSetContextRoots( 94 await plugin.handleAnalysisSetContextRoots(
95 new AnalysisSetContextRootsParams([contextRoot1])); 95 new AnalysisSetContextRootsParams([contextRoot1]));
96 await plugin.handleAnalysisSetContextRoots( 96 await plugin.handleAnalysisSetContextRoots(
97 new AnalysisSetContextRootsParams([contextRoot2])); 97 new AnalysisSetContextRootsParams([contextRoot2]));
98 var result = await plugin.handleAnalysisReanalyze( 98 var result = await plugin.handleAnalysisReanalyze(
99 new AnalysisReanalyzeParams(roots: [packagePath2])); 99 new AnalysisReanalyzeParams(roots: [packagePath2]));
100 expect(result, isNotNull); 100 expect(result, isNotNull);
101 } 101 }
102 102
103 @failingTest
104 test_handleAnalysisSetContextBuilderOptions() async {
105 var result = await plugin.handleAnalysisSetContextBuilderOptions(
106 new AnalysisSetContextBuilderOptionsParams(
107 new ContextBuilderOptions()));
108 expect(result, isNotNull);
109 }
110
111 test_handleAnalysisSetContextRoots() async { 103 test_handleAnalysisSetContextRoots() async {
112 var result = await plugin.handleAnalysisSetContextRoots( 104 var result = await plugin.handleAnalysisSetContextRoots(
113 new AnalysisSetContextRootsParams([contextRoot1])); 105 new AnalysisSetContextRootsParams([contextRoot1]));
114 expect(result, isNotNull); 106 expect(result, isNotNull);
115 AnalysisDriverGeneric driver = _getDriver(contextRoot1); 107 AnalysisDriverGeneric driver = _getDriver(contextRoot1);
116 expect(driver, isNotNull); 108 expect(driver, isNotNull);
117 expect((driver as MockAnalysisDriver).addedFiles, hasLength(1)); 109 expect((driver as MockAnalysisDriver).addedFiles, hasLength(1));
118 } 110 }
119 111
120 test_handleAnalysisSetPriorityFiles() async { 112 test_handleAnalysisSetPriorityFiles() async {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 test_onRequest_analysisReanalyze_subset() async { 280 test_onRequest_analysisReanalyze_subset() async {
289 await channel 281 await channel
290 .sendRequest(new AnalysisSetContextRootsParams([contextRoot1])); 282 .sendRequest(new AnalysisSetContextRootsParams([contextRoot1]));
291 await channel 283 await channel
292 .sendRequest(new AnalysisSetContextRootsParams([contextRoot2])); 284 .sendRequest(new AnalysisSetContextRootsParams([contextRoot2]));
293 var result = await channel 285 var result = await channel
294 .sendRequest(new AnalysisReanalyzeParams(roots: [packagePath2])); 286 .sendRequest(new AnalysisReanalyzeParams(roots: [packagePath2]));
295 expect(result, isNotNull); 287 expect(result, isNotNull);
296 } 288 }
297 289
298 test_onRequest_analysisSetContextBuilderOptions() async {
299 var result = await channel.sendRequest(
300 new AnalysisSetContextBuilderOptionsParams(
301 new ContextBuilderOptions()));
302 expect(result, isNotNull);
303 }
304
305 test_onRequest_analysisSetContextRoots() async { 290 test_onRequest_analysisSetContextRoots() async {
306 var result = await channel 291 var result = await channel
307 .sendRequest(new AnalysisSetContextRootsParams([contextRoot1])); 292 .sendRequest(new AnalysisSetContextRootsParams([contextRoot1]));
308 expect(result, isNotNull); 293 expect(result, isNotNull);
309 AnalysisDriverGeneric driver = _getDriver(contextRoot1); 294 AnalysisDriverGeneric driver = _getDriver(contextRoot1);
310 expect(driver, isNotNull); 295 expect(driver, isNotNull);
311 expect((driver as MockAnalysisDriver).addedFiles, hasLength(1)); 296 expect((driver as MockAnalysisDriver).addedFiles, hasLength(1));
312 } 297 }
313 298
314 test_onRequest_analysisSetPriorityFiles() async { 299 test_onRequest_analysisSetPriorityFiles() async {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 413
429 _TestServerPlugin(ResourceProvider resourceProvider) 414 _TestServerPlugin(ResourceProvider resourceProvider)
430 : super(resourceProvider); 415 : super(resourceProvider);
431 416
432 @override 417 @override
433 void sendNotificationsForSubscriptions( 418 void sendNotificationsForSubscriptions(
434 Map<String, List<AnalysisService>> subscriptions) { 419 Map<String, List<AnalysisService>> subscriptions) {
435 latestSubscriptions = subscriptions; 420 latestSubscriptions = subscriptions;
436 } 421 }
437 } 422 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart ('k') | pkg/analyzer_plugin/tool/spec/plugin_spec.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698