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

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

Issue 2653683004: Stop using SDK summary bundle. Analyze dart:xxx as any other libraries. (Closed)
Patch Set: Restore optional SDK bundle. Created 3 years, 11 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/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);

Powered by Google App Engine
This is Rietveld 408576698