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_server; | 5 library test.analysis_server; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/analysis_server.dart'; | 9 import 'package:analysis_server/src/analysis_server.dart'; |
10 import 'package:analysis_server/src/constants.dart'; | 10 import 'package:analysis_server/src/constants.dart'; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // It's normal for this notification to be sent twice. | 264 // It's normal for this notification to be sent twice. |
265 // TODO(paulberry): why? | 265 // TODO(paulberry): why? |
266 break; | 266 break; |
267 default: | 267 default: |
268 if (!notificationTypesReceived.add(notificationType)) { | 268 if (!notificationTypesReceived.add(notificationType)) { |
269 fail('Notification type $notificationType received more than once'); | 269 fail('Notification type $notificationType received more than once'); |
270 } | 270 } |
271 break; | 271 break; |
272 } | 272 } |
273 } | 273 } |
274 return null; // Work around dartbug.com/22091 | |
275 } | 274 } |
276 | 275 |
277 Future test_prioritySourcesChangedEvent() { | 276 Future test_prioritySourcesChangedEvent() { |
278 resourceProvider.newFolder('/foo'); | 277 resourceProvider.newFolder('/foo'); |
279 | 278 |
280 int eventCount = 0; | 279 int eventCount = 0; |
281 Source firstSource = null; | 280 Source firstSource = null; |
282 server.onPriorityChange.listen((PriorityChangeEvent event) { | 281 server.onPriorityChange.listen((PriorityChangeEvent event) { |
283 ++eventCount; | 282 ++eventCount; |
284 firstSource = event.firstSource; | 283 firstSource = event.firstSource; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 @override | 381 @override |
383 Response handleRequest(Request request) { | 382 Response handleRequest(Request request) { |
384 if (request.method == 'echo') { | 383 if (request.method == 'echo') { |
385 return new Response(request.id, result: { | 384 return new Response(request.id, result: { |
386 'echo': true | 385 'echo': true |
387 }); | 386 }); |
388 } | 387 } |
389 return null; | 388 return null; |
390 } | 389 } |
391 } | 390 } |
OLD | NEW |