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

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

Issue 981283003: Change all sources associated with changed files (issue 22680) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 5 years, 9 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
Index: pkg/analysis_server/test/context_manager_test.dart
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index eab479f0796b621285eb35225d2c3d2c82b1eb88..61a3c092a28e95c3576256d1059198f2d2b30622 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -847,6 +847,11 @@ class TestContextManager extends ContextManager {
int now = 0;
/**
+ * The analysis context that was created.
+ */
+ AnalysisContextImpl currentContext;
+
+ /**
* Map from context to the timestamp when the context was created.
*/
Map<String, int> currentContextTimestamps = <String, int>{};
@@ -888,10 +893,10 @@ class TestContextManager extends ContextManager {
currentContextFilePaths[path] = <String, int>{};
currentContextSources[path] = new HashSet<Source>();
currentContextPackageUriResolvers[path] = packageUriResolver;
- AnalysisContextImpl context = new AnalysisContextImpl();
- context.sourceFactory = new SourceFactory(
+ currentContext = new AnalysisContextImpl();
+ currentContext.sourceFactory = new SourceFactory(
packageUriResolver == null ? [] : [packageUriResolver]);
- return context;
+ return currentContext;
}
@override
@@ -913,6 +918,8 @@ class TestContextManager extends ContextManager {
expect(filePaths, contains(source.fullName));
filePaths[source.fullName] = now;
}
+
+ currentContext.applyChanges(changeSet);
}
void assertContextFiles(String contextPath, List<String> expectedFiles) {

Powered by Google App Engine
This is Rietveld 408576698