OLD | NEW |
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 import 'dart:async'; | 5 import 'dart:async'; |
6 | 6 |
7 import 'package:analysis_server/protocol/protocol.dart'; | 7 import 'package:analysis_server/protocol/protocol.dart'; |
8 import 'package:analysis_server/protocol/protocol_constants.dart'; | 8 import 'package:analysis_server/protocol/protocol_constants.dart'; |
9 import 'package:analysis_server/protocol/protocol_generated.dart'; | 9 import 'package:analysis_server/protocol/protocol_generated.dart'; |
10 import 'package:analysis_server/src/analysis_server.dart'; | 10 import 'package:analysis_server/src/analysis_server.dart'; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 serverChannel = new MockServerChannel(); | 49 serverChannel = new MockServerChannel(); |
50 resourceProvider = new MemoryResourceProvider(); | 50 resourceProvider = new MemoryResourceProvider(); |
51 ServerPlugin serverPlugin = new ServerPlugin(); | 51 ServerPlugin serverPlugin = new ServerPlugin(); |
52 processRequiredPlugins(serverPlugin); | 52 processRequiredPlugins(serverPlugin); |
53 // Create an SDK in the mock file system. | 53 // Create an SDK in the mock file system. |
54 new MockSdk(resourceProvider: resourceProvider); | 54 new MockSdk(resourceProvider: resourceProvider); |
55 server = new AnalysisServer( | 55 server = new AnalysisServer( |
56 serverChannel, | 56 serverChannel, |
57 resourceProvider, | 57 resourceProvider, |
58 new MockPackageMapProvider(), | 58 new MockPackageMapProvider(), |
59 null, | |
60 serverPlugin, | 59 serverPlugin, |
61 new AnalysisServerOptions(), | 60 new AnalysisServerOptions(), |
62 new DartSdkManager('/', false), | 61 new DartSdkManager('/', false), |
63 InstrumentationService.NULL_SERVICE); | 62 InstrumentationService.NULL_SERVICE); |
64 handler = new AnalysisDomainHandler(server); | 63 handler = new AnalysisDomainHandler(server); |
65 }); | 64 }); |
66 | 65 |
67 group('updateContent', testUpdateContent); | 66 group('updateContent', testUpdateContent); |
68 | 67 |
69 group('AnalysisDomainHandler', () { | 68 group('AnalysisDomainHandler', () { |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 ServerPlugin serverPlugin = new ServerPlugin(); | 436 ServerPlugin serverPlugin = new ServerPlugin(); |
438 processRequiredPlugins(serverPlugin); | 437 processRequiredPlugins(serverPlugin); |
439 serverChannel = new MockServerChannel(); | 438 serverChannel = new MockServerChannel(); |
440 resourceProvider = new MemoryResourceProvider(); | 439 resourceProvider = new MemoryResourceProvider(); |
441 // Create an SDK in the mock file system. | 440 // Create an SDK in the mock file system. |
442 new MockSdk(resourceProvider: resourceProvider); | 441 new MockSdk(resourceProvider: resourceProvider); |
443 server = new AnalysisServer( | 442 server = new AnalysisServer( |
444 serverChannel, | 443 serverChannel, |
445 resourceProvider, | 444 resourceProvider, |
446 new MockPackageMapProvider(), | 445 new MockPackageMapProvider(), |
447 null, | |
448 serverPlugin, | 446 serverPlugin, |
449 new AnalysisServerOptions(), | 447 new AnalysisServerOptions(), |
450 new DartSdkManager('/', false), | 448 new DartSdkManager('/', false), |
451 InstrumentationService.NULL_SERVICE); | 449 InstrumentationService.NULL_SERVICE); |
452 handler = new AnalysisDomainHandler(server); | 450 handler = new AnalysisDomainHandler(server); |
453 // listen for notifications | 451 // listen for notifications |
454 Stream<Notification> notificationStream = | 452 Stream<Notification> notificationStream = |
455 serverChannel.notificationController.stream; | 453 serverChannel.notificationController.stream; |
456 notificationStream.listen((Notification notification) { | 454 notificationStream.listen((Notification notification) { |
457 if (notification.event == ANALYSIS_NOTIFICATION_ERRORS) { | 455 if (notification.event == ANALYSIS_NOTIFICATION_ERRORS) { |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 plugin.AnalysisSetSubscriptionsParams params = | 805 plugin.AnalysisSetSubscriptionsParams params = |
808 pluginManager.analysisSetSubscriptionsParams; | 806 pluginManager.analysisSetSubscriptionsParams; |
809 expect(params, isNotNull); | 807 expect(params, isNotNull); |
810 Map<plugin.AnalysisService, List<String>> subscriptions = | 808 Map<plugin.AnalysisService, List<String>> subscriptions = |
811 params.subscriptions; | 809 params.subscriptions; |
812 expect(subscriptions, hasLength(1)); | 810 expect(subscriptions, hasLength(1)); |
813 List<String> files = subscriptions[plugin.AnalysisService.HIGHLIGHTS]; | 811 List<String> files = subscriptions[plugin.AnalysisService.HIGHLIGHTS]; |
814 expect(files, [testFile]); | 812 expect(files, [testFile]); |
815 } | 813 } |
816 } | 814 } |
OLD | NEW |