| Index: pkg/analysis_server/test/edit/assists_test.dart
|
| diff --git a/pkg/analysis_server/test/edit/assists_test.dart b/pkg/analysis_server/test/edit/assists_test.dart
|
| index 0181c878275d993d7e60c0071ec6a5b529f46dda..7e6092f063dd1cd77db3dc079c076f9d51e3a612 100644
|
| --- a/pkg/analysis_server/test/edit/assists_test.dart
|
| +++ b/pkg/analysis_server/test/edit/assists_test.dart
|
| @@ -2,10 +2,14 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -library test.edit.assists;
|
| +import 'dart:async';
|
|
|
| import 'package:analysis_server/plugin/protocol/protocol.dart';
|
| import 'package:analysis_server/src/edit/edit_domain.dart';
|
| +import 'package:analysis_server/src/plugin/plugin_manager.dart';
|
| +import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
|
| +import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
|
| +import 'package:analyzer_plugin/src/protocol/protocol_internal.dart' as plugin;
|
| import 'package:plugin/manager.dart';
|
| import 'package:test/test.dart';
|
| import 'package:test_reflective_loader/test_reflective_loader.dart';
|
| @@ -37,6 +41,7 @@ class AssistsTest extends AbstractAnalysisTest {
|
|
|
| @override
|
| void setUp() {
|
| + enableNewAnalysisDriver = true;
|
| super.setUp();
|
| createProject();
|
| ExtensionManager manager = new ExtensionManager();
|
| @@ -44,6 +49,27 @@ class AssistsTest extends AbstractAnalysisTest {
|
| handler = new EditDomainHandler(server);
|
| }
|
|
|
| + test_fromPlugins() async {
|
| + PluginInfo info = new PluginInfo('a', 'b', 'c', null, null);
|
| + String message = 'From a plugin';
|
| + plugin.PrioritizedSourceChange change = new plugin.PrioritizedSourceChange(
|
| + 5,
|
| + new plugin.SourceChange(message, edits: <plugin.SourceFileEdit>[
|
| + new plugin.SourceFileEdit('', 0,
|
| + edits: <plugin.SourceEdit>[new plugin.SourceEdit(0, 0, 'x')])
|
| + ]));
|
| + plugin.EditGetAssistsResult result = new plugin.EditGetAssistsResult(
|
| + <plugin.PrioritizedSourceChange>[change]);
|
| + pluginManager.broadcastResults = <PluginInfo, Future<plugin.Response>>{
|
| + info: new Future.value(result.toResponse('-'))
|
| + };
|
| +
|
| + addTestFile('main() {}');
|
| + await waitForTasksFinished();
|
| + await prepareAssists('in(');
|
| + _assertHasChange(message, 'xmain() {}');
|
| + }
|
| +
|
| test_removeTypeAnnotation() async {
|
| addTestFile('''
|
| main() {
|
|
|