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

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

Issue 2107793002: Generalize DartSdkManager to support embedder SDKs (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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.execution; 5 library test.domain.execution;
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';
11 import 'package:analysis_server/src/constants.dart'; 11 import 'package:analysis_server/src/constants.dart';
12 import 'package:analysis_server/src/context_manager.dart'; 12 import 'package:analysis_server/src/context_manager.dart';
13 import 'package:analysis_server/src/domain_execution.dart'; 13 import 'package:analysis_server/src/domain_execution.dart';
14 import 'package:analysis_server/src/plugin/server_plugin.dart'; 14 import 'package:analysis_server/src/plugin/server_plugin.dart';
15 import 'package:analyzer/file_system/file_system.dart'; 15 import 'package:analyzer/file_system/file_system.dart';
16 import 'package:analyzer/file_system/memory_file_system.dart'; 16 import 'package:analyzer/file_system/memory_file_system.dart';
17 import 'package:analyzer/instrumentation/instrumentation.dart'; 17 import 'package:analyzer/instrumentation/instrumentation.dart';
18 import 'package:analyzer/src/generated/engine.dart'; 18 import 'package:analyzer/src/generated/engine.dart';
19 import 'package:analyzer/src/generated/sdk.dart';
19 import 'package:analyzer/src/generated/source.dart'; 20 import 'package:analyzer/src/generated/source.dart';
20 import 'package:analyzer/src/generated/source_io.dart'; 21 import 'package:analyzer/src/generated/source_io.dart';
21 import 'package:plugin/manager.dart'; 22 import 'package:plugin/manager.dart';
22 import 'package:test_reflective_loader/test_reflective_loader.dart'; 23 import 'package:test_reflective_loader/test_reflective_loader.dart';
23 import 'package:typed_mock/typed_mock.dart'; 24 import 'package:typed_mock/typed_mock.dart';
24 import 'package:unittest/unittest.dart'; 25 import 'package:unittest/unittest.dart';
25 26
26 import 'analysis_abstract.dart'; 27 import 'analysis_abstract.dart';
27 import 'mock_sdk.dart'; 28 import 'mock_sdk.dart';
28 import 'mocks.dart'; 29 import 'mocks.dart';
(...skipping 12 matching lines...) Expand all
41 ExtensionManager manager = new ExtensionManager(); 42 ExtensionManager manager = new ExtensionManager();
42 ServerPlugin serverPlugin = new ServerPlugin(); 43 ServerPlugin serverPlugin = new ServerPlugin();
43 manager.processPlugins([serverPlugin]); 44 manager.processPlugins([serverPlugin]);
44 server = new AnalysisServer( 45 server = new AnalysisServer(
45 new MockServerChannel(), 46 new MockServerChannel(),
46 provider, 47 provider,
47 new MockPackageMapProvider(), 48 new MockPackageMapProvider(),
48 null, 49 null,
49 serverPlugin, 50 serverPlugin,
50 new AnalysisServerOptions(), 51 new AnalysisServerOptions(),
51 (_) => new MockSdk(), 52 new DartSdkManager('', false, (_) => new MockSdk()),
52 InstrumentationService.NULL_SERVICE); 53 InstrumentationService.NULL_SERVICE);
53 handler = new ExecutionDomainHandler(server); 54 handler = new ExecutionDomainHandler(server);
54 }); 55 });
55 56
56 group('createContext/deleteContext', () { 57 group('createContext/deleteContext', () {
57 test('create/delete multiple contexts', () { 58 test('create/delete multiple contexts', () {
58 Request request = 59 Request request =
59 new ExecutionCreateContextParams('/a/b.dart').toRequest('0'); 60 new ExecutionCreateContextParams('/a/b.dart').toRequest('0');
60 Response response = handler.handleRequest(request); 61 Response response = handler.handleRequest(request);
61 expect(response, isResponseSuccess('0')); 62 expect(response, isResponseSuccess('0'));
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 * A [Source] that knows it's [fullName]. 349 * A [Source] that knows it's [fullName].
349 */ 350 */
350 class TestSource implements Source { 351 class TestSource implements Source {
351 String fullName; 352 String fullName;
352 353
353 TestSource(this.fullName); 354 TestSource(this.fullName);
354 355
355 @override 356 @override
356 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 357 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
357 } 358 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/domain_diagnostic_test.dart ('k') | pkg/analysis_server/test/domain_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698