Index: pkg/analysis_server/test/abstract_context.dart |
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart |
index 16ad89c89cbe919eb502bca9401f5196d8c3df00..d243352bbf40fdbefc18c0ec538510c1ac0bd529 100644 |
--- a/pkg/analysis_server/test/abstract_context.dart |
+++ b/pkg/analysis_server/test/abstract_context.dart |
@@ -6,7 +6,6 @@ library testing.abstract_context; |
import 'dart:async'; |
-import 'mock_sdk.dart'; |
import 'package:analyzer/dart/ast/ast.dart'; |
import 'package:analyzer/dart/element/element.dart'; |
import 'package:analyzer/dart/element/visitor.dart'; |
@@ -22,6 +21,8 @@ import 'package:analyzer/src/generated/engine.dart' as engine; |
import 'package:analyzer/src/generated/sdk.dart'; |
import 'package:analyzer/src/generated/source_io.dart'; |
+import 'mock_sdk.dart'; |
+ |
/** |
* Finds an [Element] with the given [name]. |
*/ |
@@ -45,10 +46,8 @@ Element findChildElement(Element root, String name, [ElementKind kind]) { |
typedef void _ElementVisitorFunction(Element element); |
class AbstractContextTest { |
- static final DartSdk SDK = new MockSdk(); |
- static final UriResolver SDK_RESOLVER = new DartUriResolver(SDK); |
- |
MemoryResourceProvider provider; |
+ DartSdk sdk; |
Map<String, List<Folder>> packageMap; |
UriResolver resourceResolver; |
@@ -135,12 +134,13 @@ class AbstractContextTest { |
void setUp() { |
processRequiredPlugins(); |
setupResourceProvider(); |
+ sdk = new MockSdk(resourceProvider: provider); |
resourceResolver = new ResourceUriResolver(provider); |
packageMap = new Map<String, List<Folder>>(); |
PackageMapUriResolver packageResolver = |
new PackageMapUriResolver(provider, packageMap); |
- SourceFactory sourceFactory = |
- new SourceFactory([SDK_RESOLVER, packageResolver, resourceResolver]); |
+ SourceFactory sourceFactory = new SourceFactory( |
+ [new DartUriResolver(sdk), packageResolver, resourceResolver]); |
if (enableNewAnalysisDriver) { |
PerformanceLog log = new PerformanceLog(_logBuffer); |
AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log); |