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

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

Issue 2910463002: Allow plugins to provide completions for non-dart files (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 unified diff | Download patch
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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/protocol/protocol.dart'; 7 import 'package:analysis_server/protocol/protocol.dart';
8 import 'package:analysis_server/protocol/protocol_generated.dart'; 8 import 'package:analysis_server/protocol/protocol_generated.dart';
9 import 'package:analysis_server/src/plugin/plugin_manager.dart'; 9 import 'package:analysis_server/src/plugin/plugin_manager.dart';
10 import 'package:analysis_server/src/provisional/completion/completion_core.dart' ; 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart' ;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 test_constructor6() async { 218 test_constructor6() async {
219 addTestFile('class A {bool foo; A() : a=7,^ void bar() {}}'); 219 addTestFile('class A {bool foo; A() : a=7,^ void bar() {}}');
220 await getSuggestions(); 220 await getSuggestions();
221 assertHasResult(CompletionSuggestionKind.KEYWORD, 'super', 221 assertHasResult(CompletionSuggestionKind.KEYWORD, 'super',
222 relevance: DART_RELEVANCE_KEYWORD); 222 relevance: DART_RELEVANCE_KEYWORD);
223 assertHasResult(CompletionSuggestionKind.INVOCATION, 'foo', 223 assertHasResult(CompletionSuggestionKind.INVOCATION, 'foo',
224 relevance: DART_RELEVANCE_LOCAL_FIELD); 224 relevance: DART_RELEVANCE_LOCAL_FIELD);
225 } 225 }
226 226
227 @failingTest
228 test_html() { 227 test_html() {
229 // 228 //
230 // We no longer support the analysis of non-dart files. 229 // We no longer support the analysis of non-dart files.
231 // 230 //
232 testFile = '/project/web/test.html'; 231 testFile = '/project/web/test.html';
233 addTestFile(''' 232 addTestFile('''
234 <html>^</html> 233 <html>^</html>
235 '''); 234 ''');
236 return getSuggestions().then((_) { 235 return getSuggestions().then((_) {
237 expect(replacementOffset, equals(completionOffset)); 236 expect(replacementOffset, equals(completionOffset));
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 765
767 @override 766 @override
768 Future sort( 767 Future sort(
769 CompletionRequest request, Iterable<CompletionSuggestion> suggestions) { 768 CompletionRequest request, Iterable<CompletionSuggestion> suggestions) {
770 if (!enabled) { 769 if (!enabled) {
771 throw 'unexpected sort'; 770 throw 'unexpected sort';
772 } 771 }
773 return new Future.value(); 772 return new Future.value();
774 } 773 }
775 } 774 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698