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

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

Issue 2382053002: Remove unused option in server API (Closed)
Patch Set: Created 4 years, 3 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 87f62fddfd25ebc48e1b0ea2cc4fb4e61bab3d6c..ffaae9575706c952e33fad261947a55f6b5405c0 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -444,10 +444,6 @@ test_pack:lib/''');
newFile([examplePath, ContextManagerImpl.PACKAGE_SPEC_NAME]);
newFile([examplePath, 'example.dart']);
- packageMapProvider.packageMap['proj'] = <Folder>[
- resourceProvider.getResource(libPath)
- ];
-
manager.setRoots(<String>[projPath], <String>[], <String, String>{});
expect(callbacks.currentContextPaths, hasLength(2));
@@ -491,7 +487,6 @@ test_pack:lib/''');
}
void test_setRoots_addFolderWithoutPubspec() {
- packageMapProvider.packageMap = null;
manager.setRoots(<String>[projPath], <String>[], <String, String>{});
// verify
expect(callbacks.currentContextPaths, hasLength(1));
@@ -982,7 +977,6 @@ test_pack:lib/''');
}
void test_setRoots_removeFolderWithoutPubspec() {
- packageMapProvider.packageMap = null;
// add one root - there is a context
manager.setRoots(<String>[projPath], <String>[], <String, String>{});
expect(callbacks.currentContextPaths, hasLength(1));
@@ -1619,7 +1613,6 @@ test_pack:lib/''');
// create a dependency file
String dependencyPath = posix.join(projPath, 'dep');
resourceProvider.newFile(dependencyPath, 'contents');
- packageMapProvider.dependencies.add(dependencyPath);
// create a Dart file
String dartFilePath = posix.join(projPath, 'main.dart');
resourceProvider.newFile(dartFilePath, 'contents');
@@ -1628,7 +1621,6 @@ test_pack:lib/''');
expect(_currentPackageMap, isEmpty);
// Change the package map dependency so that the packageMapProvider is
// re-run, and arrange for it to return null from computePackageMap().
- packageMapProvider.packageMap = null;
resourceProvider.modifyFile(dependencyPath, 'new contents');
await pumpEventQueue();
// The package map should have been changed to null.
@@ -1710,8 +1702,6 @@ abstract class ContextManagerTest {
MemoryResourceProvider resourceProvider;
- MockPackageMapProvider packageMapProvider;
-
UriResolver packageResolver = null;
String projPath = '/my/proj';
@@ -1794,14 +1784,12 @@ abstract class ContextManagerTest {
void setUp() {
processRequiredPlugins();
resourceProvider = new MemoryResourceProvider();
- packageMapProvider = new MockPackageMapProvider();
DartSdk sdk = new MockSdk(resourceProvider: resourceProvider);
DartSdkManager sdkManager = new DartSdkManager('/', false, (_) => sdk);
manager = new ContextManagerImpl(
resourceProvider,
sdkManager,
providePackageResolver,
- packageMapProvider,
analysisFilesGlobs,
InstrumentationService.NULL_SERVICE,
new AnalysisOptionsImpl());
@@ -2709,11 +2697,6 @@ class TestContextManagerCallbacks extends ContextManagerCallbacks {
}
@override
- void computingPackageMap(bool computing) {
- // Do nothing.
- }
-
- @override
ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options) {
DartSdkManager sdkManager = new DartSdkManager('/', false, null);
ContextBuilder builder =
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.dart ('k') | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698