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

Unified Diff: pkg/analysis_server/test/src/plugin/plugin_manager_test.dart

Issue 2947743002: Add support to pass the location of the analysis options file to plugins (Closed)
Patch Set: Created 3 years, 6 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/src/plugin/plugin_manager_test.dart
diff --git a/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart b/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart
index 47500578ed6d6792f33b51c67fbfe6b716e4340c..2fd7c361855ce5f9c71708753f9a9cd7a8c62ad4 100644
--- a/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart
+++ b/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart
@@ -119,11 +119,21 @@ class DiscoveredPluginInfoTest {
}
test_addContextRoot() {
+ String optionsFilePath = '/pkg1/analysis_options.yaml';
ContextRoot contextRoot1 = new ContextRoot('/pkg1', []);
+ contextRoot1.optionsFilePath = optionsFilePath;
+ PluginSession session = new PluginSession(plugin);
+ TestServerCommunicationChannel channel =
+ new TestServerCommunicationChannel(session);
+ plugin.currentSession = session;
plugin.addContextRoot(contextRoot1);
expect(plugin.contextRoots, [contextRoot1]);
plugin.addContextRoot(contextRoot1);
expect(plugin.contextRoots, [contextRoot1]);
+ List<Request> sentRequests = channel.sentRequests;
+ expect(sentRequests, hasLength(1));
+ List<Map> roots = sentRequests[0].params['roots'];
+ expect(roots[0]['optionsFile'], optionsFilePath);
}
test_creation() {
« no previous file with comments | « pkg/analysis_server/lib/src/plugin/plugin_manager.dart ('k') | pkg/analyzer/lib/source/analysis_options_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698