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

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

Issue 2382033003: Revert "Remove unused option in server API" (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.diagnostic; 5 library test.domain.diagnostic;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.dart';
8 import 'package:analysis_server/src/analysis_server.dart'; 8 import 'package:analysis_server/src/analysis_server.dart';
9 import 'package:analysis_server/src/domain_diagnostic.dart'; 9 import 'package:analysis_server/src/domain_diagnostic.dart';
10 import 'package:analysis_server/src/plugin/server_plugin.dart'; 10 import 'package:analysis_server/src/plugin/server_plugin.dart';
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 manager.processPlugins(plugins); 44 manager.processPlugins(plugins);
45 // 45 //
46 // Create the server 46 // Create the server
47 // 47 //
48 var serverChannel = new MockServerChannel(); 48 var serverChannel = new MockServerChannel();
49 resourceProvider = new MemoryResourceProvider(); 49 resourceProvider = new MemoryResourceProvider();
50 MockSdk sdk = new MockSdk(resourceProvider: resourceProvider); 50 MockSdk sdk = new MockSdk(resourceProvider: resourceProvider);
51 server = new AnalysisServer( 51 server = new AnalysisServer(
52 serverChannel, 52 serverChannel,
53 resourceProvider, 53 resourceProvider,
54 new MockPackageMapProvider(),
54 null, 55 null,
55 serverPlugin, 56 serverPlugin,
56 new AnalysisServerOptions(), 57 new AnalysisServerOptions(),
57 new DartSdkManager('/', false, (_) => sdk), 58 new DartSdkManager('/', false, (_) => sdk),
58 InstrumentationService.NULL_SERVICE); 59 InstrumentationService.NULL_SERVICE);
59 handler = new DiagnosticDomainHandler(server); 60 handler = new DiagnosticDomainHandler(server);
60 }); 61 });
61 62
62 group('DiagnosticDomainHandler', () { 63 group('DiagnosticDomainHandler', () {
63 test('getDiagnostics', () async { 64 test('getDiagnostics', () async {
(...skipping 21 matching lines...) Expand all
85 }); 86 });
86 87
87 test('getDiagnostics - (no root)', () async { 88 test('getDiagnostics - (no root)', () async {
88 var request = new DiagnosticGetDiagnosticsParams().toRequest('0'); 89 var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
89 var response = handler.handleRequest(request); 90 var response = handler.handleRequest(request);
90 Map json = response.toJson()[Response.RESULT]; 91 Map json = response.toJson()[Response.RESULT];
91 expect(json['contexts'], hasLength(0)); 92 expect(json['contexts'], hasLength(0));
92 }); 93 });
93 }); 94 });
94 } 95 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/domain_analysis_test.dart ('k') | pkg/analysis_server/test/domain_execution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698