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

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

Issue 2382053002: 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(),
55 null, 54 null,
56 serverPlugin, 55 serverPlugin,
57 new AnalysisServerOptions(), 56 new AnalysisServerOptions(),
58 new DartSdkManager('/', false, (_) => sdk), 57 new DartSdkManager('/', false, (_) => sdk),
59 InstrumentationService.NULL_SERVICE); 58 InstrumentationService.NULL_SERVICE);
60 handler = new DiagnosticDomainHandler(server); 59 handler = new DiagnosticDomainHandler(server);
61 }); 60 });
62 61
63 group('DiagnosticDomainHandler', () { 62 group('DiagnosticDomainHandler', () {
64 test('getDiagnostics', () async { 63 test('getDiagnostics', () async {
(...skipping 21 matching lines...) Expand all
86 }); 85 });
87 86
88 test('getDiagnostics - (no root)', () async { 87 test('getDiagnostics - (no root)', () async {
89 var request = new DiagnosticGetDiagnosticsParams().toRequest('0'); 88 var request = new DiagnosticGetDiagnosticsParams().toRequest('0');
90 var response = handler.handleRequest(request); 89 var response = handler.handleRequest(request);
91 Map json = response.toJson()[Response.RESULT]; 90 Map json = response.toJson()[Response.RESULT];
92 expect(json['contexts'], hasLength(0)); 91 expect(json['contexts'], hasLength(0));
93 }); 92 });
94 }); 93 });
95 } 94 }
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