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

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

Issue 2552023002: Send 'analysis.flushResults' on file removal. (Closed)
Patch Set: 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
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.context.directory.manager; 5 library test.context.directory.manager;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/context_manager.dart'; 9 import 'package:analysis_server/src/context_manager.dart';
10 import 'package:analyzer/error/error.dart'; 10 import 'package:analyzer/error/error.dart';
(...skipping 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 sources.remove(source); 2514 sources.remove(source);
2515 } 2515 }
2516 for (Source source in changeSet.changedSources) { 2516 for (Source source in changeSet.changedSources) {
2517 expect(filePaths, contains(source.fullName)); 2517 expect(filePaths, contains(source.fullName));
2518 filePaths[source.fullName] = now; 2518 filePaths[source.fullName] = now;
2519 } 2519 }
2520 2520
2521 currentContext.applyChanges(changeSet); 2521 currentContext.applyChanges(changeSet);
2522 } 2522 }
2523 2523
2524 @override
2525 void applyFileRemoved(AnalysisDriver driver, String file) {
2526 throw new StateError('Unexpected invocation of applyFileRemoved');
2527 }
2528
2524 void assertContextFiles(String contextPath, List<String> expectedFiles) { 2529 void assertContextFiles(String contextPath, List<String> expectedFiles) {
2525 var actualFiles = currentContextFilePaths[contextPath].keys; 2530 var actualFiles = currentContextFilePaths[contextPath].keys;
2526 expect(actualFiles, unorderedEquals(expectedFiles)); 2531 expect(actualFiles, unorderedEquals(expectedFiles));
2527 } 2532 }
2528 2533
2529 void assertContextPaths(List<String> expected) { 2534 void assertContextPaths(List<String> expected) {
2530 expect(currentContextPaths, unorderedEquals(expected)); 2535 expect(currentContextPaths, unorderedEquals(expected));
2531 } 2536 }
2532 2537
2533 @override 2538 @override
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
2590 class TestUriResolver extends UriResolver { 2595 class TestUriResolver extends UriResolver {
2591 Map<Uri, Source> uriMap; 2596 Map<Uri, Source> uriMap;
2592 2597
2593 TestUriResolver(this.uriMap); 2598 TestUriResolver(this.uriMap);
2594 2599
2595 @override 2600 @override
2596 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 2601 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
2597 return uriMap[uri]; 2602 return uriMap[uri];
2598 } 2603 }
2599 } 2604 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698