| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 @reflectiveTest | 192 @reflectiveTest |
| 193 class PluginManagerFromDiskTest extends PluginTestSupport { | 193 class PluginManagerFromDiskTest extends PluginTestSupport { |
| 194 String byteStorePath = '/byteStore'; | 194 String byteStorePath = '/byteStore'; |
| 195 PluginManager manager; | 195 PluginManager manager; |
| 196 | 196 |
| 197 void setUp() { | 197 void setUp() { |
| 198 super.setUp(); | 198 super.setUp(); |
| 199 manager = new PluginManager(resourceProvider, byteStorePath, '', | 199 manager = new PluginManager(resourceProvider, byteStorePath, '', |
| 200 notificationManager, InstrumentationService.NULL_SERVICE); | 200 notificationManager, InstrumentationService.NULL_SERVICE); |
| 201 manager.whitelistEverything(); | |
| 202 } | 201 } |
| 203 | 202 |
| 204 test_addPluginToContextRoot() async { | 203 test_addPluginToContextRoot() async { |
| 205 io.Directory pkg1Dir = io.Directory.systemTemp.createTempSync('pkg1'); | 204 io.Directory pkg1Dir = io.Directory.systemTemp.createTempSync('pkg1'); |
| 206 String pkgPath = pkg1Dir.resolveSymbolicLinksSync(); | 205 String pkgPath = pkg1Dir.resolveSymbolicLinksSync(); |
| 207 await withPlugin(test: (String pluginPath) async { | 206 await withPlugin(test: (String pluginPath) async { |
| 208 ContextRoot contextRoot = new ContextRoot(pkgPath, []); | 207 ContextRoot contextRoot = new ContextRoot(pkgPath, []); |
| 209 await manager.addPluginToContextRoot(contextRoot, pluginPath); | 208 await manager.addPluginToContextRoot(contextRoot, pluginPath); |
| 210 await manager.stopAll(); | 209 await manager.stopAll(); |
| 211 }); | 210 }); |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 } | 909 } |
| 911 | 910 |
| 912 @override | 911 @override |
| 913 void sendRequest(Request request) { | 912 void sendRequest(Request request) { |
| 914 sentRequests.add(request); | 913 sentRequests.add(request); |
| 915 if (request.method == 'plugin.shutdown') { | 914 if (request.method == 'plugin.shutdown') { |
| 916 session.handleOnDone(); | 915 session.handleOnDone(); |
| 917 } | 916 } |
| 918 } | 917 } |
| 919 } | 918 } |
| OLD | NEW |