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

Side by Side Diff: pkg/analysis_server/test/single_context_manager_test.dart

Issue 2570623002: Fix bug when packages file changes in new driver (Closed)
Patch Set: clear file state Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.analysis_server.src.single_context_manager; 5 library test.analysis_server.src.single_context_manager;
6 6
7 import 'dart:core'; 7 import 'dart:core';
8 8
9 import 'package:analysis_server/src/single_context_manager.dart'; 9 import 'package:analysis_server/src/single_context_manager.dart';
10 import 'package:analysis_server/src/utilities/null_string_sink.dart'; 10 import 'package:analysis_server/src/utilities/null_string_sink.dart';
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 String newFolder(List<String> pathComponents) { 57 String newFolder(List<String> pathComponents) {
58 String folderPath = path.posix.joinAll(pathComponents); 58 String folderPath = path.posix.joinAll(pathComponents);
59 resourceProvider.newFolder(folderPath); 59 resourceProvider.newFolder(folderPath);
60 return folderPath; 60 return folderPath;
61 } 61 }
62 62
63 void setUp() { 63 void setUp() {
64 packageResolver = new TestUriResolver(); 64 packageResolver = new TestUriResolver();
65 65
66 _processRequiredPlugins(); 66 _processRequiredPlugins();
67 DartSdkManager sdkManager = new DartSdkManager('', false); 67 DartSdkManager sdkManager = new DartSdkManager('/', false);
68 manager = new SingleContextManager(resourceProvider, sdkManager, 68 manager = new SingleContextManager(resourceProvider, sdkManager,
69 (_) => packageResolver, analysisFilesGlobs, new AnalysisOptionsImpl()); 69 (_) => packageResolver, analysisFilesGlobs, new AnalysisOptionsImpl());
70 PerformanceLog logger = new PerformanceLog(new NullStringSink()); 70 PerformanceLog logger = new PerformanceLog(new NullStringSink());
71 AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(logger); 71 AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(logger);
72 callbacks = 72 callbacks = new TestContextManagerCallbacks(
73 new TestContextManagerCallbacks(resourceProvider, logger, scheduler); 73 resourceProvider, sdkManager, logger, scheduler);
74 manager.callbacks = callbacks; 74 manager.callbacks = callbacks;
75 } 75 }
76 76
77 void test_isIgnored_false() { 77 void test_isIgnored_false() {
78 String project = '/project'; 78 String project = '/project';
79 resourceProvider.newFolder(project); 79 resourceProvider.newFolder(project);
80 manager.setRoots(<String>[project], <String>[], <String, String>{}); 80 manager.setRoots(<String>[project], <String>[], <String, String>{});
81 expect(manager.isIgnored('$project/file.dart'), isFalse); 81 expect(manager.isIgnored('$project/file.dart'), isFalse);
82 } 82 }
83 83
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 manager.processPlugins(plugins); 540 manager.processPlugins(plugins);
541 } 541 }
542 } 542 }
543 543
544 class TestUriResolver extends UriResolver { 544 class TestUriResolver extends UriResolver {
545 @override 545 @override
546 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 546 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
547 return null; 547 return null;
548 } 548 }
549 } 549 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698