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

Side by Side Diff: pkg/analysis_server/test/analysis_server_test.dart

Issue 1401403005: More extension manager unification [TBR]. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | 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) 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.analysis_server; 5 library test.analysis_server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 expect(fooContext.getKindOf(barSource), SourceKind.UNKNOWN); 116 expect(fooContext.getKindOf(barSource), SourceKind.UNKNOWN);
117 expect(barContext.getKindOf(fooSource), SourceKind.UNKNOWN); 117 expect(barContext.getKindOf(fooSource), SourceKind.UNKNOWN);
118 expect(barContext.getKindOf(barSource), SourceKind.LIBRARY); 118 expect(barContext.getKindOf(barSource), SourceKind.LIBRARY);
119 }); 119 });
120 } 120 }
121 121
122 void setUp() { 122 void setUp() {
123 channel = new MockServerChannel(); 123 channel = new MockServerChannel();
124 resourceProvider = new MemoryResourceProvider(); 124 resourceProvider = new MemoryResourceProvider();
125 packageMapProvider = new MockPackageMapProvider(); 125 packageMapProvider = new MockPackageMapProvider();
126 ExtensionManager manager = new ExtensionManager(); 126
127 ServerPlugin serverPlugin = new ServerPlugin(); 127 ServerPlugin serverPlugin = new ServerPlugin();
128 manager.processPlugins([serverPlugin]); 128
129 // Defer to the extension manager in AE for plugin registration.
130 AnalysisEngine.instance.userDefinedPlugins = [serverPlugin];
131 // Force registration.
132 AnalysisEngine.instance.taskManager;
133
129 server = new AnalysisServer( 134 server = new AnalysisServer(
130 channel, 135 channel,
131 resourceProvider, 136 resourceProvider,
132 packageMapProvider, 137 packageMapProvider,
133 null, 138 null,
134 serverPlugin, 139 serverPlugin,
135 new AnalysisServerOptions(), 140 new AnalysisServerOptions(),
136 new MockSdk(), 141 new MockSdk(),
137 InstrumentationService.NULL_SERVICE, 142 InstrumentationService.NULL_SERVICE,
138 rethrowExceptions: true); 143 rethrowExceptions: true);
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 _MockServerOperation(this.context); 519 _MockServerOperation(this.context);
515 520
516 @override 521 @override
517 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; 522 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS;
518 523
519 @override 524 @override
520 void perform(AnalysisServer server) { 525 void perform(AnalysisServer server) {
521 isComplete = true; 526 isComplete = true;
522 } 527 }
523 } 528 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698