Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart

Issue 2571333002: Fix completion tests that attempted to resolve a library. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698