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

Side by Side Diff: pkg/analyzer_plugin/test/plugin/mocks.dart

Issue 3009513002: Clean up after some recent code changes (Closed)
Patch Set: Created 3 years, 3 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:collection'; 6 import 'dart:collection';
7 7
8 import 'package:analyzer/file_system/file_system.dart'; 8 import 'package:analyzer/file_system/file_system.dart';
9 import 'package:analyzer/src/dart/analysis/driver.dart'; 9 import 'package:analyzer/src/dart/analysis/driver.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 Completer<Response> completer = completers.remove(response.id); 113 Completer<Response> completer = completers.remove(response.id);
114 completer.complete(response); 114 completer.complete(response);
115 } 115 }
116 } 116 }
117 117
118 /** 118 /**
119 * A concrete implementation of a server plugin that is suitable for testing. 119 * A concrete implementation of a server plugin that is suitable for testing.
120 */ 120 */
121 class MockServerPlugin extends ServerPlugin { 121 class MockServerPlugin extends ServerPlugin {
122 MockChannel mockChannel = new MockChannel();
123
124 MockServerPlugin(ResourceProvider resourceProvider) : super(resourceProvider); 122 MockServerPlugin(ResourceProvider resourceProvider) : super(resourceProvider);
125 123
126 @override 124 @override
127 PluginCommunicationChannel get channel => mockChannel;
128
129 @override
130 List<String> get fileGlobsToAnalyze => <String>['*.dart']; 125 List<String> get fileGlobsToAnalyze => <String>['*.dart'];
131 126
132 @override 127 @override
133 String get name => 'Test Plugin'; 128 String get name => 'Test Plugin';
134 129
135 @override 130 @override
136 String get version => '0.1.0'; 131 String get version => '0.1.0';
137 132
138 @override 133 @override
139 AnalysisDriverGeneric createAnalysisDriver(ContextRoot contextRoot) { 134 AnalysisDriverGeneric createAnalysisDriver(ContextRoot contextRoot) {
(...skipping 28 matching lines...) Expand all
168 163
169 @override 164 @override
170 Uri get uri => Uri.parse('package:test/test.dart'); 165 Uri get uri => Uri.parse('package:test/test.dart');
171 166
172 @override 167 @override
173 UriKind get uriKind => UriKind.PACKAGE_URI; 168 UriKind get uriKind => UriKind.PACKAGE_URI;
174 169
175 @override 170 @override
176 bool exists() => true; 171 bool exists() => true;
177 } 172 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/lib/plugin/completion_mixin.dart ('k') | pkg/analyzer_plugin/test/plugin/navigation_mixin_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698