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

Unified Diff: pkg/analysis_server/test/analysis/set_priority_files_test.dart

Issue 2834993002: Add support for three more plugin requests (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/analysis/set_priority_files_test.dart
diff --git a/pkg/analysis_server/test/analysis/set_priority_files_test.dart b/pkg/analysis_server/test/analysis/set_priority_files_test.dart
index 5a870cc232c5050cbb0067dedb55b58aa77d7910..28a0629beb122167e8467f17e18cc13e0d5195d4 100644
--- a/pkg/analysis_server/test/analysis/set_priority_files_test.dart
+++ b/pkg/analysis_server/test/analysis/set_priority_files_test.dart
@@ -9,6 +9,7 @@ import 'package:analysis_server/src/domain_analysis.dart';
import 'package:analyzer/src/generated/engine.dart'
show InternalAnalysisContext;
import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -126,6 +127,20 @@ analyzer:
expect(response.error.code, RequestErrorCode.UNANALYZED_PRIORITY_FILES);
}
+ test_sentToPlugins() async {
+ addTestFile('');
+ // wait for analysis to ensure that the file is known to the context
+ await server.onAnalysisComplete;
+ // set priority files
+ Response response = await _setPriorityFile(testFile);
+ expect(response, isResponseSuccess('0'));
+ // verify
+ plugin.AnalysisSetPriorityFilesParams params =
+ pluginManager.analysisSetPriorityFilesParams;
+ expect(params, isNotNull);
+ expect(params.files, <String>[testFile]);
+ }
+
_setPriorityFile(String file) async {
Request request =
new AnalysisSetPriorityFilesParams(<String>[file]).toRequest('0');
« no previous file with comments | « pkg/analysis_server/lib/src/plugin/request_converter.dart ('k') | pkg/analysis_server/test/analysis/update_content_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698