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

Side by Side Diff: pkg/analysis_server/test/edit/assists_test.dart

Issue 1080653003: Create a public API for contributing fixes and make fixes pluggable (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Missed clean-up Created 5 years, 8 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 | Annotate | Revision Log
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.edit.assists; 5 library test.edit.assists;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/edit/edit_domain.dart'; 9 import 'package:analysis_server/src/edit/edit_domain.dart';
10 import 'package:analysis_server/src/plugin/server_plugin.dart';
10 import 'package:analysis_server/src/protocol.dart'; 11 import 'package:analysis_server/src/protocol.dart';
12 import 'package:analyzer/src/plugin/plugin_impl.dart';
11 import 'package:unittest/unittest.dart' hide ERROR; 13 import 'package:unittest/unittest.dart' hide ERROR;
12 14
13 import '../analysis_abstract.dart'; 15 import '../analysis_abstract.dart';
14 import '../reflective_tests.dart'; 16 import '../reflective_tests.dart';
15 17
16 main() { 18 main() {
17 groupSep = ' | '; 19 groupSep = ' | ';
18 runReflectiveTests(AssistsTest); 20 runReflectiveTests(AssistsTest);
19 } 21 }
20 22
(...skipping 11 matching lines...) Expand all
32 new EditGetAssistsParams(testFile, offset, length).toRequest('0'); 34 new EditGetAssistsParams(testFile, offset, length).toRequest('0');
33 Response response = handleSuccessfulRequest(request); 35 Response response = handleSuccessfulRequest(request);
34 var result = new EditGetAssistsResult.fromResponse(response); 36 var result = new EditGetAssistsResult.fromResponse(response);
35 changes = result.assists; 37 changes = result.assists;
36 } 38 }
37 39
38 @override 40 @override
39 void setUp() { 41 void setUp() {
40 super.setUp(); 42 super.setUp();
41 createProject(); 43 createProject();
42 handler = new EditDomainHandler(server); 44 ExtensionManager manager = new ExtensionManager();
45 ServerPlugin plugin = new ServerPlugin();
46 manager.processPlugins([plugin]);
47 handler = new EditDomainHandler(server, plugin);
43 } 48 }
44 49
45 Future test_removeTypeAnnotation() { 50 Future test_removeTypeAnnotation() {
46 addTestFile(''' 51 addTestFile('''
47 main() { 52 main() {
48 int v = 1; 53 int v = 1;
49 } 54 }
50 '''); 55 ''');
51 return waitForTasksFinished().then((_) { 56 return waitForTasksFinished().then((_) {
52 prepareAssists('v ='); 57 prepareAssists('v =');
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (change.message == message) { 107 if (change.message == message) {
103 String resultCode = 108 String resultCode =
104 SourceEdit.applySequence(testCode, change.edits[0].edits); 109 SourceEdit.applySequence(testCode, change.edits[0].edits);
105 expect(resultCode, expectedCode); 110 expect(resultCode, expectedCode);
106 return; 111 return;
107 } 112 }
108 } 113 }
109 fail("Expected to find |$message| in\n" + changes.join('\n')); 114 fail("Expected to find |$message| in\n" + changes.join('\n'));
110 } 115 }
111 } 116 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | pkg/analysis_server/test/edit/fixes_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698