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>(); |