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

Unified Diff: utils/tests/pub/version_solver_test.dart

Issue 12262056: Clean up some warnings and deprecated calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/tests/pub/validator_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/version_solver_test.dart
diff --git a/utils/tests/pub/version_solver_test.dart b/utils/tests/pub/version_solver_test.dart
index eb37f640d893097449827f1a9fd546d3d2f9777f..3d4b020e2cb07d504ca977f22d10015be2aed937 100644
--- a/utils/tests/pub/version_solver_test.dart
+++ b/utils/tests/pub/version_solver_test.dart
@@ -465,11 +465,11 @@ class MockSource extends Source {
: _packages = <String, Map<Version, Package>>{};
Future<List<Version>> getVersions(String name, String description) {
- return fakeAsync(() => _packages[description].keys.toList());
+ return defer(() => _packages[description].keys.toList());
}
Future<Pubspec> describe(PackageId id) {
- return fakeAsync(() {
+ return defer(() {
return _packages[id.name][id.version].pubspec;
});
}
@@ -526,15 +526,6 @@ class MockVersionlessSource extends Source {
}
}
-Future fakeAsync(callback()) {
- var completer = new Completer();
- Timer.run(() {
- completer.complete(callback());
- });
-
- return completer.future;
-}
-
Pair<String, Source> parseSource(String name) {
var match = new RegExp(r"(.*) from (.*)").firstMatch(name);
if (match == null) return new Pair<String, Source>(name, source1);
« no previous file with comments | « utils/tests/pub/validator_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698