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

Side by Side Diff: pkg/analysis_server/test/analysis_abstract.dart

Issue 875163002: Make AnalysisServer.onAnalysisComplete a Future and wait for it before refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months 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 | Annotate | Revision Log
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.domain.analysis.abstract; 5 library test.domain.analysis.abstract;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/analysis_server.dart'; 9 import 'package:analysis_server/src/analysis_server.dart';
10 import 'package:analysis_server/src/domain_analysis.dart'; 10 import 'package:analysis_server/src/domain_analysis.dart';
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 void tearDown() { 252 void tearDown() {
253 server.done(); 253 server.done();
254 handler = null; 254 handler = null;
255 server = null; 255 server = null;
256 resourceProvider = null; 256 resourceProvider = null;
257 serverChannel = null; 257 serverChannel = null;
258 } 258 }
259 259
260 /** 260 /**
261 * Returns a [Future] that completes when the [AnalysisServer] finishes 261 * Returns a [Future] that completes when the server's analysis is complete.
262 * all its scheduled tasks.
263 */ 262 */
264 Future waitForTasksFinished() { 263 Future waitForTasksFinished() {
265 return waitForServerOperationsPerformed(server); 264 return server.onAnalysisComplete;
266 } 265 }
267 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698