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

Unified Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 1126233008: Move DartWorkManager notification to _sourceChanged(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/analyzer/lib/src/context/context.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/context/context_test.dart
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 0ae0ea56e55ed0e5214b29bfed44467cedd68e15..d799f1df2413f6441c006f472654db8acac6d5cb 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -1664,6 +1664,23 @@ main() {}''');
// assertLength(0, statistics.getSources());
}
+ void test_handleContentsChanged() {
+ ContentCache contentCache = new ContentCache();
+ context.contentCache = contentCache;
+ String oldContents = 'foo() {}';
+ String newContents = 'bar() {}';
+ // old contents
+ Source source = addSource("/test.dart", oldContents);
+ _analyzeAll_assertFinished();
+ expect(context.getResolvedCompilationUnit2(source, source), isNotNull);
+ // new contents
+ contentCache.setContents(source, newContents);
+ context.handleContentsChanged(source, oldContents, newContents, true);
+ // there is some work to do
+ AnalysisResult analysisResult = context.performAnalysisTask();
+ expect(analysisResult.changeNotices, isNotNull);
+ }
+
void test_isClientLibrary_dart() {
Source source = addSource("/test.dart", r'''
import 'dart:html';
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698