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

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

Issue 2843093002: Send re-analyze requests to plugins (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
« no previous file with comments | « pkg/analysis_server/test/analysis_abstract.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11ed4066a6702ed50e09401c35a7a4539751cb6a..51c29018dfc4d281ec0141bd8333722e32e769d2 100644
--- a/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart
+++ b/pkg/analysis_server/test/src/plugin/plugin_manager_test.dart
@@ -128,7 +128,7 @@ class PluginManagerFromDiskTest extends PluginTestSupport {
pkg1Dir.deleteSync(recursive: true);
}
- test_broadcast_many() async {
+ test_broadcastRequest_many() async {
io.Directory pkg1Dir = io.Directory.systemTemp.createTempSync('pkg1');
String pkgPath = pkg1Dir.resolveSymbolicLinksSync();
await withPlugin(
@@ -143,9 +143,33 @@ class PluginManagerFromDiskTest extends PluginTestSupport {
Map<PluginInfo, Future<Response>> responses =
manager.broadcastRequest(
- contextRoot,
new CompletionGetSuggestionsParams(
- '/pkg1/lib/pkg1.dart', 100));
+ '/pkg1/lib/pkg1.dart', 100),
+ contextRoot: contextRoot);
+ expect(responses, hasLength(2));
+
+ await manager.stopAll();
+ });
+ });
+ pkg1Dir.deleteSync(recursive: true);
+ }
+
+ test_broadcastRequest_many_noContextRoot() async {
+ io.Directory pkg1Dir = io.Directory.systemTemp.createTempSync('pkg1');
+ String pkgPath = pkg1Dir.resolveSymbolicLinksSync();
+ await withPlugin(
+ pluginName: 'plugin1',
+ test: (String plugin1Path) async {
+ await withPlugin(
+ pluginName: 'plugin2',
+ test: (String plugin2Path) async {
+ ContextRoot contextRoot = new ContextRoot(pkgPath, []);
+ await manager.addPluginToContextRoot(contextRoot, plugin1Path);
+ await manager.addPluginToContextRoot(contextRoot, plugin2Path);
+
+ Map<PluginInfo, Future<Response>> responses =
+ manager.broadcastRequest(new CompletionGetSuggestionsParams(
+ '/pkg1/lib/pkg1.dart', 100));
expect(responses, hasLength(2));
await manager.stopAll();
@@ -253,8 +277,8 @@ class PluginManagerTest {
void test_broadcastRequest_none() {
ContextRoot contextRoot = new ContextRoot('/pkg1', []);
Map<PluginInfo, Future<Response>> responses = manager.broadcastRequest(
- contextRoot,
- new CompletionGetSuggestionsParams('/pkg1/lib/pkg1.dart', 100));
+ new CompletionGetSuggestionsParams('/pkg1/lib/pkg1.dart', 100),
+ contextRoot: contextRoot);
expect(responses, hasLength(0));
}
« no previous file with comments | « pkg/analysis_server/test/analysis_abstract.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698