| 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.services.completion.dart.util; | 5 library test.services.completion.dart.util; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol | 9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol |
| 10 show Element, ElementKind; | 10 show Element, ElementKind; |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 // We use a delayed future to allow microtask events to finish. The | 559 // We use a delayed future to allow microtask events to finish. The |
| 560 // Future.value or Future() constructors use scheduleMicrotask themselves an
d | 560 // Future.value or Future() constructors use scheduleMicrotask themselves an
d |
| 561 // would therefore not wait for microtask callbacks that are scheduled after | 561 // would therefore not wait for microtask callbacks that are scheduled after |
| 562 // invoking this method. | 562 // invoking this method. |
| 563 return new Future.delayed( | 563 return new Future.delayed( |
| 564 Duration.ZERO, () => performAnalysis(times - 1, completer)); | 564 Duration.ZERO, () => performAnalysis(times - 1, completer)); |
| 565 } | 565 } |
| 566 | 566 |
| 567 void resolveSource(String path, String content) { | 567 void resolveSource(String path, String content) { |
| 568 Source libSource = addSource(path, content); | 568 Source libSource = addSource(path, content); |
| 569 var target = new LibrarySpecificUnit(libSource, libSource); | 569 if (!enableNewAnalysisDriver) { |
| 570 context.computeResult(target, RESOLVED_UNIT); | 570 var target = new LibrarySpecificUnit(libSource, libSource); |
| 571 context.computeResult(target, RESOLVED_UNIT); |
| 572 } |
| 571 } | 573 } |
| 572 | 574 |
| 573 @override | 575 @override |
| 574 void setUp() { | 576 void setUp() { |
| 575 super.setUp(); | 577 super.setUp(); |
| 576 index = createMemoryIndex(); | 578 index = createMemoryIndex(); |
| 577 searchEngine = new SearchEngineImpl(index); | 579 searchEngine = new SearchEngineImpl(index); |
| 578 contributor = createContributor(); | 580 contributor = createContributor(); |
| 579 } | 581 } |
| 580 } | 582 } |
| OLD | NEW |