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

Side by Side Diff: pkg/analysis_server/test/src/plugin/plugin_manager_test.dart

Issue 2897653002: Add the ability to whitelist plugins (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « pkg/analysis_server/test/analysis_abstract.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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: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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis_abstract.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698