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

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

Issue 1830703002: Pass AnalysisOptions into SdkCreator, disable changing afterwards. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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) 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 29 matching lines...) Expand all
40 ExtensionManager manager = new ExtensionManager(); 40 ExtensionManager manager = new ExtensionManager();
41 ServerPlugin serverPlugin = new ServerPlugin(); 41 ServerPlugin serverPlugin = new ServerPlugin();
42 manager.processPlugins([serverPlugin]); 42 manager.processPlugins([serverPlugin]);
43 server = new AnalysisServer( 43 server = new AnalysisServer(
44 serverChannel, 44 serverChannel,
45 resourceProvider, 45 resourceProvider,
46 new MockPackageMapProvider(), 46 new MockPackageMapProvider(),
47 null, 47 null,
48 serverPlugin, 48 serverPlugin,
49 new AnalysisServerOptions(), 49 new AnalysisServerOptions(),
50 () => new MockSdk(), 50 (_) => new MockSdk(),
51 InstrumentationService.NULL_SERVICE); 51 InstrumentationService.NULL_SERVICE);
52 handler = new AnalysisDomainHandler(server); 52 handler = new AnalysisDomainHandler(server);
53 }); 53 });
54 54
55 group('updateContent', testUpdateContent); 55 group('updateContent', testUpdateContent);
56 56
57 group('AnalysisDomainHandler', () { 57 group('AnalysisDomainHandler', () {
58 group('getReachableSources', () { 58 group('getReachableSources', () {
59 test('valid sources', () async { 59 test('valid sources', () async {
60 String fileA = '/project/a.dart'; 60 String fileA = '/project/a.dart';
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 ExtensionManager manager = new ExtensionManager(); 467 ExtensionManager manager = new ExtensionManager();
468 ServerPlugin serverPlugin = new ServerPlugin(); 468 ServerPlugin serverPlugin = new ServerPlugin();
469 manager.processPlugins([serverPlugin]); 469 manager.processPlugins([serverPlugin]);
470 server = new AnalysisServer( 470 server = new AnalysisServer(
471 serverChannel, 471 serverChannel,
472 resourceProvider, 472 resourceProvider,
473 new MockPackageMapProvider(), 473 new MockPackageMapProvider(),
474 null, 474 null,
475 serverPlugin, 475 serverPlugin,
476 new AnalysisServerOptions(), 476 new AnalysisServerOptions(),
477 () => new MockSdk(), 477 (_) => new MockSdk(),
478 InstrumentationService.NULL_SERVICE); 478 InstrumentationService.NULL_SERVICE);
479 handler = new AnalysisDomainHandler(server); 479 handler = new AnalysisDomainHandler(server);
480 // listen for notifications 480 // listen for notifications
481 Stream<Notification> notificationStream = 481 Stream<Notification> notificationStream =
482 serverChannel.notificationController.stream; 482 serverChannel.notificationController.stream;
483 notificationStream.listen((Notification notification) { 483 notificationStream.listen((Notification notification) {
484 if (notification.event == ANALYSIS_ERRORS) { 484 if (notification.event == ANALYSIS_ERRORS) {
485 var decoded = new AnalysisErrorsParams.fromNotification(notification); 485 var decoded = new AnalysisErrorsParams.fromNotification(notification);
486 filesErrors[decoded.file] = decoded.errors; 486 filesErrors[decoded.file] = decoded.errors;
487 } 487 }
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 test_beforeAnalysis() async { 808 test_beforeAnalysis() async {
809 addTestFile('int V = 42;'); 809 addTestFile('int V = 42;');
810 createProject(); 810 createProject();
811 // subscribe 811 // subscribe
812 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile); 812 addAnalysisSubscription(AnalysisService.HIGHLIGHTS, testFile);
813 // wait for analysis 813 // wait for analysis
814 await waitForTasksFinished(); 814 await waitForTasksFinished();
815 expect(filesHighlights[testFile], isNotEmpty); 815 expect(filesHighlights[testFile], isNotEmpty);
816 } 816 }
817 } 817 }
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