| 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 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analysis_server/protocol/protocol.dart'; | 7 import 'package:analysis_server/protocol/protocol.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_constants.dart'; |
| 8 import 'package:analysis_server/protocol/protocol_generated.dart'; | 9 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 9 import 'package:analysis_server/src/constants.dart'; | |
| 10 import 'package:analysis_server/src/services/index/index.dart'; | 10 import 'package:analysis_server/src/services/index/index.dart'; |
| 11 import 'package:analyzer_plugin/protocol/protocol_common.dart'; | 11 import 'package:analyzer_plugin/protocol/protocol_common.dart'; |
| 12 import 'package:test/test.dart'; | 12 import 'package:test/test.dart'; |
| 13 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 13 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 14 | 14 |
| 15 import '../analysis_abstract.dart'; | 15 import '../analysis_abstract.dart'; |
| 16 | 16 |
| 17 main() { | 17 main() { |
| 18 defineReflectiveSuite(() { | 18 defineReflectiveSuite(() { |
| 19 defineReflectiveTests(AnalysisNotificationImplementedTest); | 19 defineReflectiveTests(AnalysisNotificationImplementedTest); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 /** | 101 /** |
| 102 * Subscribe for `IMPLEMENTED` and wait for the notification. | 102 * Subscribe for `IMPLEMENTED` and wait for the notification. |
| 103 */ | 103 */ |
| 104 Future prepareImplementedElements() { | 104 Future prepareImplementedElements() { |
| 105 subscribeForImplemented(); | 105 subscribeForImplemented(); |
| 106 return waitForImplementedElements(); | 106 return waitForImplementedElements(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 void processNotification(Notification notification) { | 109 void processNotification(Notification notification) { |
| 110 if (notification.event == ANALYSIS_IMPLEMENTED) { | 110 if (notification.event == ANALYSIS_NOTIFICATION_IMPLEMENTED) { |
| 111 var params = new AnalysisImplementedParams.fromNotification(notification); | 111 var params = new AnalysisImplementedParams.fromNotification(notification); |
| 112 if (params.file == testFile) { | 112 if (params.file == testFile) { |
| 113 implementedClasses = params.classes; | 113 implementedClasses = params.classes; |
| 114 implementedMembers = params.members; | 114 implementedMembers = params.members; |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 void setUp() { | 119 void setUp() { |
| 120 super.setUp(); | 120 super.setUp(); |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 if (times == 0 || implementedClasses != null) { | 429 if (times == 0 || implementedClasses != null) { |
| 430 return new Future.value(); | 430 return new Future.value(); |
| 431 } | 431 } |
| 432 return new Future.delayed( | 432 return new Future.delayed( |
| 433 new Duration(milliseconds: 1), () => waitForNotification(times - 1)); | 433 new Duration(milliseconds: 1), () => waitForNotification(times - 1)); |
| 434 } | 434 } |
| 435 | 435 |
| 436 return waitForNotification(30000); | 436 return waitForNotification(30000); |
| 437 } | 437 } |
| 438 } | 438 } |
| OLD | NEW |