Index: pkg/analysis_server/test/analysis_server_test.dart |
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart |
index 6e7ada51830e301a39fffb4a083cd98dacb032a5..6355ccf35e3de538434fd75b5d34f2d18dcddbe2 100644 |
--- a/pkg/analysis_server/test/analysis_server_test.dart |
+++ b/pkg/analysis_server/test/analysis_server_test.dart |
@@ -48,6 +48,19 @@ class AnalysisServerTest { |
rethrowExceptions: true); |
} |
+ Future test_contextDisposed() { |
+ resourceProvider.newFolder('/foo'); |
+ resourceProvider.newFile('/foo/bar.dart', 'library lib;'); |
+ server.setAnalysisRoots('0', ['/foo'], [], {}); |
+ AnalysisContext context; |
+ return pumpEventQueue().then((_) { |
+ context = server.getAnalysisContext('/foo/bar.dart'); |
+ server.setAnalysisRoots('1', [], [], {}); |
+ }).then((_) => pumpEventQueue()).then((_) { |
+ expect(context.isDisposed, isTrue); |
+ }); |
+ } |
+ |
Future test_contextsChangedEvent() { |
resourceProvider.newFolder('/foo'); |