OLD | NEW |
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:io' as io; | 6 import 'dart:io' as io; |
7 | 7 |
8 import 'package:analysis_server/src/plugin/notification_manager.dart'; | 8 import 'package:analysis_server/src/plugin/notification_manager.dart'; |
9 import 'package:analysis_server/src/plugin/plugin_manager.dart'; | 9 import 'package:analysis_server/src/plugin/plugin_manager.dart'; |
10 import 'package:analyzer/context/context_root.dart'; | 10 import 'package:analyzer/context/context_root.dart'; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 @reflectiveTest | 181 @reflectiveTest |
182 class PluginManagerFromDiskTest extends PluginTestSupport { | 182 class PluginManagerFromDiskTest extends PluginTestSupport { |
183 String byteStorePath = '/byteStore'; | 183 String byteStorePath = '/byteStore'; |
184 PluginManager manager; | 184 PluginManager manager; |
185 | 185 |
186 void setUp() { | 186 void setUp() { |
187 super.setUp(); | 187 super.setUp(); |
188 manager = new PluginManager(resourceProvider, byteStorePath, '', | 188 manager = new PluginManager(resourceProvider, byteStorePath, '', |
189 notificationManager, InstrumentationService.NULL_SERVICE); | 189 notificationManager, InstrumentationService.NULL_SERVICE); |
| 190 manager.whitelistEverything(); |
190 } | 191 } |
191 | 192 |
192 test_addPluginToContextRoot() async { | 193 test_addPluginToContextRoot() async { |
193 io.Directory pkg1Dir = io.Directory.systemTemp.createTempSync('pkg1'); | 194 io.Directory pkg1Dir = io.Directory.systemTemp.createTempSync('pkg1'); |
194 String pkgPath = pkg1Dir.resolveSymbolicLinksSync(); | 195 String pkgPath = pkg1Dir.resolveSymbolicLinksSync(); |
195 await withPlugin(test: (String pluginPath) async { | 196 await withPlugin(test: (String pluginPath) async { |
196 ContextRoot contextRoot = new ContextRoot(pkgPath, []); | 197 ContextRoot contextRoot = new ContextRoot(pkgPath, []); |
197 await manager.addPluginToContextRoot(contextRoot, pluginPath); | 198 await manager.addPluginToContextRoot(contextRoot, pluginPath); |
198 await manager.stopAll(); | 199 await manager.stopAll(); |
199 }); | 200 }); |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 void onNotification(Notification notification), | 689 void onNotification(Notification notification), |
689 {Function onError, void onDone()}) { | 690 {Function onError, void onDone()}) { |
690 fail('Unexpected invocation of listen'); | 691 fail('Unexpected invocation of listen'); |
691 } | 692 } |
692 | 693 |
693 @override | 694 @override |
694 void sendRequest(Request request) { | 695 void sendRequest(Request request) { |
695 sentRequests.add(request); | 696 sentRequests.add(request); |
696 } | 697 } |
697 } | 698 } |
OLD | NEW |