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

Unified Diff: pkg/analysis_testing/lib/abstract_context.dart

Issue 427473003: Uncomment and test fixes for importing libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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_testing/lib/abstract_context.dart
diff --git a/pkg/analysis_testing/lib/abstract_context.dart b/pkg/analysis_testing/lib/abstract_context.dart
index fe2b7407c8aa60845e7d2c5ee95143b3609135eb..72728ed6af50bfc3b233fe6b3ece3a9eb4406866 100644
--- a/pkg/analysis_testing/lib/abstract_context.dart
+++ b/pkg/analysis_testing/lib/abstract_context.dart
@@ -54,6 +54,23 @@ class AbstractContextTest {
return source;
}
+ void addUriResolvers(List<UriResolver> resolvers) {
+ resolvers.add(new DartUriResolver(SDK));
+ resolvers.add(new ResourceUriResolver(provider));
+ }
+
+ /**
+ * Performs all analysis tasks in [context].
+ */
+ void performAllAnalysisTasks() {
+ while (true) {
+ AnalysisResult result = context.performAnalysisTask();
+ if (!result.hasMoreWork) {
+ break;
+ }
+ }
+ }
+
CompilationUnit resolveDartUnit(Source unitSource, Source librarySource) {
return context.resolveCompilationUnit2(unitSource, librarySource);
}
@@ -64,8 +81,9 @@ class AbstractContextTest {
void setUp() {
context = AnalysisEngine.instance.createAnalysisContext();
- context.sourceFactory = new SourceFactory(<UriResolver>[new DartUriResolver(
- SDK), new ResourceUriResolver(provider)]);
+ List<UriResolver> resolvers = <UriResolver>[];
+ addUriResolvers(resolvers);
+ context.sourceFactory = new SourceFactory(resolvers);
}
void tearDown() {

Powered by Google App Engine
This is Rietveld 408576698