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 'package:analysis_server/protocol/protocol.dart'; | 5 import 'package:analysis_server/protocol/protocol.dart'; |
6 import 'package:analysis_server/protocol/protocol_generated.dart'; | 6 import 'package:analysis_server/protocol/protocol_generated.dart'; |
7 import 'package:analysis_server/src/domain_analysis.dart'; | 7 import 'package:analysis_server/src/domain_analysis.dart'; |
8 import 'package:analyzer/file_system/file_system.dart'; | 8 import 'package:analyzer/file_system/file_system.dart'; |
9 import 'package:test/test.dart'; | 9 import 'package:test/test.dart'; |
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
11 | 11 |
12 import 'notification_navigation_test.dart'; | 12 import 'notification_navigation_test.dart'; |
13 | 13 |
14 main() { | 14 main() { |
15 defineReflectiveSuite(() { | 15 defineReflectiveSuite(() { |
16 defineReflectiveTests(GetNavigationTest); | 16 defineReflectiveTests(GetNavigationTest); |
17 }); | 17 }); |
18 } | 18 } |
19 | 19 |
20 @reflectiveTest | 20 @reflectiveTest |
21 class GetNavigationTest extends AbstractNavigationTest { | 21 class GetNavigationTest extends AbstractNavigationTest { |
22 static const String requestId = 'test-getNavigation'; | 22 static const String requestId = 'test-getNavigation'; |
23 | 23 |
24 @override | 24 @override |
25 void setUp() { | 25 void setUp() { |
26 enableNewAnalysisDriver = true; | |
27 generateSummaryFiles = true; | 26 generateSummaryFiles = true; |
28 super.setUp(); | 27 super.setUp(); |
29 server.handlers = [ | 28 server.handlers = [ |
30 new AnalysisDomainHandler(server), | 29 new AnalysisDomainHandler(server), |
31 ]; | 30 ]; |
32 createProject(); | 31 createProject(); |
33 } | 32 } |
34 | 33 |
35 test_beforeAnalysisComplete() async { | 34 test_beforeAnalysisComplete() async { |
36 addTestFile(''' | 35 addTestFile(''' |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 _getNavigation(String file, int offset, int length) async { | 242 _getNavigation(String file, int offset, int length) async { |
244 Request request = _createGetNavigationRequest(file, offset, length); | 243 Request request = _createGetNavigationRequest(file, offset, length); |
245 Response response = await serverChannel.sendRequest(request); | 244 Response response = await serverChannel.sendRequest(request); |
246 AnalysisGetNavigationResult result = | 245 AnalysisGetNavigationResult result = |
247 new AnalysisGetNavigationResult.fromResponse(response); | 246 new AnalysisGetNavigationResult.fromResponse(response); |
248 targetFiles = result.files; | 247 targetFiles = result.files; |
249 targets = result.targets; | 248 targets = result.targets; |
250 regions = result.regions; | 249 regions = result.regions; |
251 } | 250 } |
252 } | 251 } |
OLD | NEW |