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.implemented; | 5 library test.analysis.notification.implemented; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/constants.dart'; | 9 import 'package:analysis_server/src/constants.dart'; |
10 import 'package:analysis_server/src/protocol.dart'; | 10 import 'package:analysis_server/src/protocol.dart'; |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 await prepareImplementedElements(); | 305 await prepareImplementedElements(); |
306 assertHasImplementedMember('f(_) {} // A'); | 306 assertHasImplementedMember('f(_) {} // A'); |
307 } | 307 } |
308 | 308 |
309 Future waitForImplementedElements() { | 309 Future waitForImplementedElements() { |
310 Future waitForNotification(int times) { | 310 Future waitForNotification(int times) { |
311 if (times == 0 || implementedClasses != null) { | 311 if (times == 0 || implementedClasses != null) { |
312 return new Future.value(); | 312 return new Future.value(); |
313 } | 313 } |
314 return new Future.delayed( | 314 return new Future.delayed( |
315 Duration.ZERO, () => waitForNotification(times - 1)); | 315 new Duration(milliseconds:1), () => waitForNotification(times - 1)); |
316 } | 316 } |
317 return waitForNotification(100); | 317 return waitForNotification(30000); |
318 } | 318 } |
319 } | 319 } |
OLD | NEW |