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

Unified Diff: pkg/analysis_server/test/analysis/get_navigation_test.dart

Issue 2908633002: Make server forward getNavigation requests to plugins (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis/get_navigation_test.dart
diff --git a/pkg/analysis_server/test/analysis/get_navigation_test.dart b/pkg/analysis_server/test/analysis/get_navigation_test.dart
index b8463f78e6ce831a45f024fd26e149948154b844..6df117964a31686571e8b4c7839c6efcc6c16d20 100644
--- a/pkg/analysis_server/test/analysis/get_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/get_navigation_test.dart
@@ -44,9 +44,14 @@ main() {
assertHasTarget('test = 0');
}
- test_fileDoesNotExist() {
+ test_fileDoesNotExist() async {
String file = '$projectPath/doesNotExist.dart';
- return _checkInvalid(file, -1, -1);
+ Request request = _createGetNavigationRequest(file, 0, 100);
+ Response response = await serverChannel.sendRequest(request);
+ expect(response.error, isNull);
+ expect(response.result['files'], isEmpty);
+ expect(response.result['targets'], isEmpty);
+ expect(response.result['regions'], isEmpty);
}
test_fileOutsideOfRoot() async {
@@ -228,13 +233,6 @@ main() {
assertHasTarget('test = 0');
}
- _checkInvalid(String file, int offset, int length) async {
- Request request = _createGetNavigationRequest(file, offset, length);
- Response response = await serverChannel.sendRequest(request);
- expect(response.error, isNotNull);
- expect(response.error.code, RequestErrorCode.GET_NAVIGATION_INVALID_FILE);
- }
-
Request _createGetNavigationRequest(String file, int offset, int length) {
return new AnalysisGetNavigationParams(file, offset, length)
.toRequest(requestId);
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698