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

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

Issue 2569603002: Remove the options plugin (Closed)
Patch Set: Created 4 years 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
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.domain.analysis; 5 library test.domain.analysis;
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 20 matching lines...) Expand all
31 }); 31 });
32 32
33 MockServerChannel serverChannel; 33 MockServerChannel serverChannel;
34 MemoryResourceProvider resourceProvider; 34 MemoryResourceProvider resourceProvider;
35 AnalysisServer server; 35 AnalysisServer server;
36 AnalysisDomainHandler handler; 36 AnalysisDomainHandler handler;
37 37
38 void processRequiredPlugins(ServerPlugin serverPlugin) { 38 void processRequiredPlugins(ServerPlugin serverPlugin) {
39 List<Plugin> plugins = <Plugin>[]; 39 List<Plugin> plugins = <Plugin>[];
40 plugins.addAll(AnalysisEngine.instance.requiredPlugins); 40 plugins.addAll(AnalysisEngine.instance.requiredPlugins);
41 plugins.add(AnalysisEngine.instance.optionsPlugin);
42 plugins.add(serverPlugin); 41 plugins.add(serverPlugin);
43 42
44 ExtensionManager manager = new ExtensionManager(); 43 ExtensionManager manager = new ExtensionManager();
45 manager.processPlugins(plugins); 44 manager.processPlugins(plugins);
46 } 45 }
47 46
48 setUp(() { 47 setUp(() {
49 serverChannel = new MockServerChannel(); 48 serverChannel = new MockServerChannel();
50 resourceProvider = new MemoryResourceProvider(); 49 resourceProvider = new MemoryResourceProvider();
51 ServerPlugin serverPlugin = new ServerPlugin(); 50 ServerPlugin serverPlugin = new ServerPlugin();
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 * Validates that the given [request] is handled successfully. 602 * Validates that the given [request] is handled successfully.
604 */ 603 */
605 void handleSuccessfulRequest(Request request) { 604 void handleSuccessfulRequest(Request request) {
606 Response response = handler.handleRequest(request); 605 Response response = handler.handleRequest(request);
607 expect(response, isResponseSuccess('0')); 606 expect(response, isResponseSuccess('0'));
608 } 607 }
609 608
610 void processRequiredPlugins(ServerPlugin serverPlugin) { 609 void processRequiredPlugins(ServerPlugin serverPlugin) {
611 List<Plugin> plugins = <Plugin>[]; 610 List<Plugin> plugins = <Plugin>[];
612 plugins.addAll(AnalysisEngine.instance.requiredPlugins); 611 plugins.addAll(AnalysisEngine.instance.requiredPlugins);
613 plugins.add(AnalysisEngine.instance.optionsPlugin);
614 plugins.add(serverPlugin); 612 plugins.add(serverPlugin);
615 613
616 ExtensionManager manager = new ExtensionManager(); 614 ExtensionManager manager = new ExtensionManager();
617 manager.processPlugins(plugins); 615 manager.processPlugins(plugins);
618 } 616 }
619 617
620 /** 618 /**
621 * Send an `updateContent` request for [testFile]. 619 * Send an `updateContent` request for [testFile].
622 */ 620 */
623 void sendContentChange(dynamic contentChange) { 621 void sendContentChange(dynamic contentChange) {
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 test_beforeAnalysis() async { 792 test_beforeAnalysis() async {
795 addTestFile('int V = 42;'); 793 addTestFile('int V = 42;');
796 createProject(); 794 createProject();
797 // subscribe 795 // subscribe
798 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile); 796 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile);
799 // wait for analysis 797 // wait for analysis
800 await waitForTasksFinished(); 798 await waitForTasksFinished();
801 expect(filesHighlights[testFile], isNotEmpty); 799 expect(filesHighlights[testFile], isNotEmpty);
802 } 800 }
803 } 801 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/context_manager_test.dart ('k') | pkg/analysis_server/test/domain_diagnostic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698