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

Side by Side Diff: sdk/lib/_internal/pub/test/serve/utils.dart

Issue 22986004: Remove some unused code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 years, 4 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) 2013, the Dart project authors. Please see the AUTHORS d.file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.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 pub_tests; 5 library pub_tests;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:http/http.dart' as http; 9 import 'package:http/http.dart' as http;
10 import 'package:scheduled_test/scheduled_process.dart'; 10 import 'package:scheduled_test/scheduled_process.dart';
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return _pubServer.nextLine().then((line) { 79 return _pubServer.nextLine().then((line) {
80 if (line.contains("successfully")) return; 80 if (line.contains("successfully")) return;
81 81
82 // This line wasn't it, so ignore it and keep trying. 82 // This line wasn't it, so ignore it and keep trying.
83 return nextLine(); 83 return nextLine();
84 }); 84 });
85 } 85 }
86 86
87 schedule(nextLine); 87 schedule(nextLine);
88 } 88 }
89
90 /// Returns a [Future] that completes after pumping the event queue [times]
91 /// times. By default, this should pump the event queue enough times to allow
92 /// any code to run, as long as it's not waiting on some external event.
93 Future _pumpEventQueue([int times=20]) {
94 if (times == 0) return new Future.value();
95 // We use a delayed future to allow runAsync events to finish. The
96 // Future.value or Future() constructors use runAsync themselves and would
97 // therefore not wait for runAsync callbacks that are scheduled after invoking
98 // this method.
99 return new Future.delayed(Duration.ZERO, () => _pumpEventQueue(times - 1));
100 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/test/serve/missing_asset_test.dart ('k') | sdk/lib/_internal/pub/test/serve/watch_added_file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698