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 library test.analysis.notification.navigation; | 5 library test.analysis.notification.navigation; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/protocol/protocol.dart'; | 9 import 'package:analysis_server/protocol/protocol.dart'; |
10 import 'package:analysis_server/protocol/protocol_generated.dart'; | 10 import 'package:analysis_server/protocol/protocol_generated.dart'; |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 if (exists == true) { | 174 if (exists == true) { |
175 fail('Expected to find (offset=$offset; length=$length) in\n' | 175 fail('Expected to find (offset=$offset; length=$length) in\n' |
176 '${regions.join('\n')}'); | 176 '${regions.join('\n')}'); |
177 } | 177 } |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 @reflectiveTest | 181 @reflectiveTest |
182 class AnalysisNotificationNavigationTest extends AbstractNavigationTest { | 182 class AnalysisNotificationNavigationTest extends AbstractNavigationTest { |
| 183 @override |
| 184 bool get enableNewAnalysisDriver => false; |
| 185 |
183 Future prepareNavigation() async { | 186 Future prepareNavigation() async { |
184 addAnalysisSubscription(AnalysisService.NAVIGATION, testFile); | 187 addAnalysisSubscription(AnalysisService.NAVIGATION, testFile); |
185 await waitForTasksFinished(); | 188 await waitForTasksFinished(); |
186 assertRegionsSorted(); | 189 assertRegionsSorted(); |
187 } | 190 } |
188 | 191 |
189 void processNotification(Notification notification) { | 192 void processNotification(Notification notification) { |
190 if (notification.event == ANALYSIS_NAVIGATION) { | 193 if (notification.event == ANALYSIS_NAVIGATION) { |
191 var params = new AnalysisNavigationParams.fromNotification(notification); | 194 var params = new AnalysisNavigationParams.fromNotification(notification); |
192 if (params.file == testFile) { | 195 if (params.file == testFile) { |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 } | 1027 } |
1025 | 1028 |
1026 test_var_topLevelVariable_single_notInferred() async { | 1029 test_var_topLevelVariable_single_notInferred() async { |
1027 addTestFile(''' | 1030 addTestFile(''' |
1028 var x; | 1031 var x; |
1029 '''); | 1032 '''); |
1030 await prepareNavigation(); | 1033 await prepareNavigation(); |
1031 assertNoRegionAt('var'); | 1034 assertNoRegionAt('var'); |
1032 } | 1035 } |
1033 } | 1036 } |
OLD | NEW |