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

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

Issue 2988343002: Initial support for an explicit plugin list (Closed)
Patch Set: Created 3 years, 4 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/lib/src/status/diagnostics.dart ('k') | pkg/analyzer/lib/src/context/context.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart
diff --git a/pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart b/pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart
index aa7fe4e838208750dd16ceee498cbc7fb615f9ca..1315741a2e684616f19c63e7d62342e1d9f13c08 100644
--- a/pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart
+++ b/pkg/analysis_server/test/src/plugin/plugin_watcher_test.dart
@@ -45,8 +45,20 @@ class PluginWatcherTest {
test_addedDriver() async {
String pkg1Path = resourceProvider.convertPath('/pkg1');
+ resourceProvider.newFile(
+ resourceProvider.convertPath('/pkg1/lib/test1.dart'), '');
+ resourceProvider.newFile(
+ resourceProvider.convertPath('/pkg2/lib/pkg2.dart'), '');
+ resourceProvider.newFile(
+ resourceProvider.convertPath('/pkg2/pubspec.yaml'), 'name: pkg2');
+ resourceProvider.newFile(
+ resourceProvider.convertPath(
+ '/pkg2/${PluginLocator.toolsFolderName}/${PluginLocator.defaultPluginFolderName}/bin/plugin.dart'),
+ '');
+
ContextRoot contextRoot = new ContextRoot(pkg1Path, []);
TestDriver driver = new TestDriver(resourceProvider, contextRoot);
+ driver.analysisOptions.enabledPluginNames = ['pkg2'];
watcher.addedDriver(driver, contextRoot);
expect(manager.addedContextRoots, isEmpty);
//
@@ -54,22 +66,12 @@ class PluginWatcherTest {
//
// Use a file in the package being analyzed.
//
- resourceProvider.newFile(
- resourceProvider.convertPath('/pkg1/lib/test1.dart'), '');
- await driver.computeResult('package:pkg1/test1.dart');
- expect(manager.addedContextRoots, isEmpty);
+// await driver.computeResult('package:pkg1/test1.dart');
+// expect(manager.addedContextRoots, isEmpty);
//
// Use a file that imports a package with a plugin.
//
- resourceProvider.newFile(
- resourceProvider.convertPath('/pkg2/lib/pkg2.dart'), '');
- resourceProvider.newFile(
- resourceProvider.convertPath('/pkg2/pubspec.yaml'), 'name: pkg2');
- resourceProvider.newFile(
- resourceProvider.convertPath(
- '/pkg2/${PluginLocator.toolsFolderName}/${PluginLocator.defaultPluginFolderName}/bin/plugin.dart'),
- '');
- await driver.computeResult('package:pkg2/pk2.dart');
+// await driver.computeResult('package:pkg2/pk2.dart');
//
// Wait until the timer associated with the driver's FileSystemState is
// guaranteed to have expired and the list of changed files will have been
@@ -100,6 +102,7 @@ class TestDriver implements AnalysisDriver {
SourceFactory sourceFactory;
FileSystemState fsState;
AnalysisSession currentSession;
+ AnalysisOptionsImpl analysisOptions = new AnalysisOptionsImpl();
final _resultController = new StreamController<AnalysisResult>();
« no previous file with comments | « pkg/analysis_server/lib/src/status/diagnostics.dart ('k') | pkg/analyzer/lib/src/context/context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698