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

Unified Diff: pkg/analysis_server/test/single_context_manager_test.dart

Issue 1919343002: Watch analysis roots separately. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/lib/src/socket_server.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/single_context_manager_test.dart
diff --git a/pkg/analysis_server/test/single_context_manager_test.dart b/pkg/analysis_server/test/single_context_manager_test.dart
index 7d04dd53d92d6e08c6b20465625ab309bfba744a..f436006a40f79ca1c5cf77529a174920001dd1d8 100644
--- a/pkg/analysis_server/test/single_context_manager_test.dart
+++ b/pkg/analysis_server/test/single_context_manager_test.dart
@@ -384,6 +384,26 @@ class SingleContextManagerTest {
callbacks.assertContextFiles(project, [file]);
}
+ test_watch_addFile_afterChangingRoots() async {
+ String contextPath = '/context';
+ String root1 = '$contextPath/root1';
+ String root2 = '$contextPath/root2';
+ String file1 = '$root1/file1.dart';
+ String file2 = '$root2/file2.dart';
+ manager.setRoots(<String>[root1], <String>[], <String, String>{});
+ manager.setRoots(<String>[root2], <String>[], <String, String>{});
+ manager.setRoots(<String>[root1, root2], <String>[], <String, String>{});
+ manager.setRoots(<String>[root2], <String>[], <String, String>{});
+ // empty folder initially
+ callbacks.assertContextFiles(root2, []);
+ // add files
+ resourceProvider.newFile(file1, '');
+ resourceProvider.newFile(file2, '');
+ // the file was added
+ await pumpEventQueue();
+ callbacks.assertContextFiles(root2, [file2]);
+ }
+
test_watch_addFile_excluded() async {
String project = '/project';
String folderA = '$project/aaa';
« no previous file with comments | « pkg/analysis_server/lib/src/socket_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698