| 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_constants.dart'; | 
| 9 import 'package:analysis_server/protocol/protocol_generated.dart'; | 9 import 'package:analysis_server/protocol/protocol_generated.dart'; | 
| 10 import 'package:analysis_server/src/services/index/index.dart'; |  | 
| 11 import 'package:analyzer_plugin/protocol/protocol_common.dart'; | 10 import 'package:analyzer_plugin/protocol/protocol_common.dart'; | 
| 12 import 'package:test/test.dart'; | 11 import 'package:test/test.dart'; | 
| 13 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 12 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 
| 14 | 13 | 
| 15 import '../analysis_abstract.dart'; | 14 import '../analysis_abstract.dart'; | 
| 16 | 15 | 
| 17 main() { | 16 main() { | 
| 18   defineReflectiveSuite(() { | 17   defineReflectiveSuite(() { | 
| 19     defineReflectiveTests(AnalysisNotificationImplementedTest); | 18     defineReflectiveTests(AnalysisNotificationImplementedTest); | 
| 20   }); | 19   }); | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 86       fail('No notification of impemented members was received'); | 85       fail('No notification of impemented members was received'); | 
| 87     } | 86     } | 
| 88     for (ImplementedMember member in implementedMembers) { | 87     for (ImplementedMember member in implementedMembers) { | 
| 89       if (member.offset == offset) { | 88       if (member.offset == offset) { | 
| 90         fail('Unexpected implemented member at $offset' | 89         fail('Unexpected implemented member at $offset' | 
| 91             ' in $implementedMembers'); | 90             ' in $implementedMembers'); | 
| 92       } | 91       } | 
| 93     } | 92     } | 
| 94   } | 93   } | 
| 95 | 94 | 
| 96   @override |  | 
| 97   Index createIndex() { |  | 
| 98     return createMemoryIndex(); |  | 
| 99   } |  | 
| 100 |  | 
| 101   /** | 95   /** | 
| 102    * Subscribe for `IMPLEMENTED` and wait for the notification. | 96    * Subscribe for `IMPLEMENTED` and wait for the notification. | 
| 103    */ | 97    */ | 
| 104   Future prepareImplementedElements() { | 98   Future prepareImplementedElements() { | 
| 105     subscribeForImplemented(); | 99     subscribeForImplemented(); | 
| 106     return waitForImplementedElements(); | 100     return waitForImplementedElements(); | 
| 107   } | 101   } | 
| 108 | 102 | 
| 109   void processNotification(Notification notification) { | 103   void processNotification(Notification notification) { | 
| 110     if (notification.event == ANALYSIS_NOTIFICATION_IMPLEMENTED) { | 104     if (notification.event == ANALYSIS_NOTIFICATION_IMPLEMENTED) { | 
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 429       if (times == 0 || implementedClasses != null) { | 423       if (times == 0 || implementedClasses != null) { | 
| 430         return new Future.value(); | 424         return new Future.value(); | 
| 431       } | 425       } | 
| 432       return new Future.delayed( | 426       return new Future.delayed( | 
| 433           new Duration(milliseconds: 1), () => waitForNotification(times - 1)); | 427           new Duration(milliseconds: 1), () => waitForNotification(times - 1)); | 
| 434     } | 428     } | 
| 435 | 429 | 
| 436     return waitForNotification(30000); | 430     return waitForNotification(30000); | 
| 437   } | 431   } | 
| 438 } | 432 } | 
| OLD | NEW | 
|---|