| Index: pkg/analysis_server/test/domain_completion_test.dart
|
| diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
|
| index 31d853be150d33cc134205fc9485770aeeea1c1d..73b6aec6b280917ef17430415ce56ba2bba39aaa 100644
|
| --- a/pkg/analysis_server/test/domain_completion_test.dart
|
| +++ b/pkg/analysis_server/test/domain_completion_test.dart
|
| @@ -8,10 +8,14 @@ import 'dart:async';
|
|
|
| import 'package:analysis_server/plugin/protocol/protocol.dart';
|
| import 'package:analysis_server/src/domain_completion.dart';
|
| +import 'package:analysis_server/src/plugin/plugin_manager.dart';
|
| import 'package:analysis_server/src/provisional/completion/completion_core.dart';
|
| import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
|
| import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
|
| import 'package:analysis_server/src/services/completion/dart/contribution_sorter.dart';
|
| +import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
|
| +import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin;
|
| +import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
|
| import 'package:test/test.dart';
|
| import 'package:test_reflective_loader/test_reflective_loader.dart';
|
|
|
| @@ -28,6 +32,12 @@ main() {
|
|
|
| @reflectiveTest
|
| class CompletionDomainHandlerTest extends AbstractCompletionDomainTest {
|
| + @override
|
| + void setUp() {
|
| + enableNewAnalysisDriver = true;
|
| + super.setUp();
|
| + }
|
| +
|
| test_ArgumentList_constructor_named_param_label() async {
|
| addTestFile('main() { new A(^);}'
|
| 'class A { A({one, two}) {} }');
|
| @@ -169,7 +179,11 @@ class CompletionDomainHandlerTest extends AbstractCompletionDomainTest {
|
| expect(suggestions, hasLength(2));
|
| }
|
|
|
| + @failingTest
|
| test_html() {
|
| + //
|
| + // We no longer support the analysis of non-dart files.
|
| + //
|
| testFile = '/project/web/test.html';
|
| addTestFile('''
|
| <html>^</html>
|
| @@ -209,7 +223,12 @@ class CompletionDomainHandlerTest extends AbstractCompletionDomainTest {
|
| });
|
| }
|
|
|
| + @failingTest
|
| test_imports_aborted_new_request() async {
|
| + // TODO(brianwilkerson) Figure out whether this test makes sense when
|
| + // running the new driver. It waits for an initial empty notification then
|
| + // waits for a new notification. But I think that under the driver we only
|
| + // ever send one notification.
|
| addTestFile('''
|
| class foo { }
|
| c^''');
|
| @@ -247,7 +266,12 @@ class CompletionDomainHandlerTest extends AbstractCompletionDomainTest {
|
| relevance: DART_RELEVANCE_HIGH);
|
| }
|
|
|
| + @failingTest
|
| test_imports_aborted_source_changed() async {
|
| + // TODO(brianwilkerson) Figure out whether this test makes sense when
|
| + // running the new driver. It waits for an initial empty notification then
|
| + // waits for a new notification. But I think that under the driver we only
|
| + // ever send one notification.
|
| addTestFile('''
|
| class foo { }
|
| c^''');
|
| @@ -626,6 +650,33 @@ class B extends A {m() {^}}
|
| });
|
| }
|
|
|
| + test_sentToPlugins() async {
|
| + addTestFile('''
|
| + void main() {
|
| + ^
|
| + }
|
| + ''');
|
| + PluginInfo info = new PluginInfo('a', 'b', 'c', null, null);
|
| + plugin.CompletionGetSuggestionsResult result =
|
| + new plugin.CompletionGetSuggestionsResult(
|
| + 1, 2, <plugin.CompletionSuggestion>[
|
| + new plugin.CompletionSuggestion(
|
| + plugin.CompletionSuggestionKind.IDENTIFIER,
|
| + DART_RELEVANCE_DEFAULT,
|
| + 'plugin completion',
|
| + 3,
|
| + 0,
|
| + false,
|
| + false)
|
| + ]);
|
| + pluginManager.broadcastResults = <PluginInfo, Future<plugin.Response>>{
|
| + info: new Future.value(result.toResponse('-'))
|
| + };
|
| + await getSuggestions();
|
| + assertHasResult(CompletionSuggestionKind.IDENTIFIER, 'plugin completion',
|
| + selectionOffset: 3);
|
| + }
|
| +
|
| test_simple() {
|
| addTestFile('''
|
| void main() {
|
|
|