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

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

Issue 1398043006: Revert server test extension manager "fix" [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 126 ExtensionManager manager = new ExtensionManager();
127 ServerPlugin serverPlugin = new ServerPlugin(); 127 ServerPlugin serverPlugin = new ServerPlugin();
128 128 manager.processPlugins([serverPlugin]);
129 // Defer to the extension manager in AE for plugin registration.
130 AnalysisEngine.instance.userDefinedPlugins = [serverPlugin];
131 // Force registration.
132 AnalysisEngine.instance.taskManager;
133
134 server = new AnalysisServer( 129 server = new AnalysisServer(
135 channel, 130 channel,
136 resourceProvider, 131 resourceProvider,
137 packageMapProvider, 132 packageMapProvider,
138 null, 133 null,
139 serverPlugin, 134 serverPlugin,
140 new AnalysisServerOptions(), 135 new AnalysisServerOptions(),
141 new MockSdk(), 136 new MockSdk(),
142 InstrumentationService.NULL_SERVICE, 137 InstrumentationService.NULL_SERVICE,
143 rethrowExceptions: true); 138 rethrowExceptions: true);
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 _MockServerOperation(this.context); 514 _MockServerOperation(this.context);
520 515
521 @override 516 @override
522 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS; 517 ServerOperationPriority get priority => ServerOperationPriority.ANALYSIS;
523 518
524 @override 519 @override
525 void perform(AnalysisServer server) { 520 void perform(AnalysisServer server) {
526 isComplete = true; 521 isComplete = true;
527 } 522 }
528 } 523 }
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