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

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

Issue 1448173002: Add ApplyChangesStatus to AnalysisContext.applyChanges() and use it in DAS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 d96439019a90861a74ecb484181b7511de6ec2d5..663c1d84d6be06e30a25d8dcea3f6f67680bc6c1 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -484,6 +484,28 @@ import "../foo/foo.dart";
});
}
+ test_watch_modifyFile_hasOverlay() async {
+ server.serverServices.add(ServerService.STATUS);
+ // configure the project
+ String projectPath = '/root';
+ String filePath = '/root/test.dart';
+ resourceProvider.newFolder(projectPath);
+ resourceProvider.newFile(filePath, '// 111');
+ server.setAnalysisRoots('0', ['/root'], [], {});
+ await pumpEventQueue();
+ // add overlay
+ server.updateContent('1', {filePath: new AddContentOverlay('// 222')});
+ await pumpEventQueue();
+ // update the file
+ channel.notificationsReceived.clear();
+ resourceProvider.modifyFile(filePath, '// 333');
+ await pumpEventQueue();
+ // the file has an overlay, so the file-system change was ignored
+ expect(channel.notificationsReceived.any((notification) {
+ return notification.event == SERVER_STATUS;
+ }), isFalse);
+ }
+
void _configureSourceFactory(AnalysisContext context) {
var resourceUriResolver = new ResourceUriResolver(resourceProvider);
var packageUriResolver = new PackageMapUriResolver(

Powered by Google App Engine
This is Rietveld 408576698