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

Side by Side Diff: utils/tests/pub/test_pub.dart

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and keep Backwards-compatibility class Date. Created 7 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
« no previous file with comments | « utils/tests/pub/oauth2_test.dart ('k') | utils/tests/pub/yaml_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /// Test infrastructure for testing pub. Unlike typical unit tests, most pub 5 /// Test infrastructure for testing pub. Unlike typical unit tests, most pub
6 /// tests are integration tests that stage some stuff on the file system, run 6 /// tests are integration tests that stage some stuff on the file system, run
7 /// pub, and then validate the results. This library provides an API to build 7 /// pub, and then validate the results. This library provides an API to build
8 /// tests like that. 8 /// tests like that.
9 library test_pub; 9 library test_pub;
10 10
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 ]); 345 ]);
346 } 346 }
347 347
348 /// Describes the file in the system cache that contains the client's OAuth2 348 /// Describes the file in the system cache that contains the client's OAuth2
349 /// credentials. The URL "/token" on [server] will be used as the token 349 /// credentials. The URL "/token" on [server] will be used as the token
350 /// endpoint for refreshing the access token. 350 /// endpoint for refreshing the access token.
351 Descriptor credentialsFile( 351 Descriptor credentialsFile(
352 ScheduledServer server, 352 ScheduledServer server,
353 String accessToken, 353 String accessToken,
354 {String refreshToken, 354 {String refreshToken,
355 Date expiration}) { 355 DateTime expiration}) {
356 return async(server.url.then((url) { 356 return async(server.url.then((url) {
357 return dir(cachePath, [ 357 return dir(cachePath, [
358 file('credentials.json', new oauth2.Credentials( 358 file('credentials.json', new oauth2.Credentials(
359 accessToken, 359 accessToken,
360 refreshToken, 360 refreshToken,
361 url.resolve('/token'), 361 url.resolve('/token'),
362 ['https://www.googleapis.com/auth/userinfo.email'], 362 ['https://www.googleapis.com/auth/userinfo.email'],
363 expiration).toJson()) 363 expiration).toJson())
364 ]); 364 ]);
365 })); 365 }));
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 /// calling [completion] is unnecessary. 1558 /// calling [completion] is unnecessary.
1559 void expectLater(Future actual, matcher, {String reason, 1559 void expectLater(Future actual, matcher, {String reason,
1560 FailureHandler failureHandler, bool verbose: false}) { 1560 FailureHandler failureHandler, bool verbose: false}) {
1561 _schedule((_) { 1561 _schedule((_) {
1562 return actual.then((value) { 1562 return actual.then((value) {
1563 expect(value, matcher, reason: reason, failureHandler: failureHandler, 1563 expect(value, matcher, reason: reason, failureHandler: failureHandler,
1564 verbose: false); 1564 verbose: false);
1565 }); 1565 });
1566 }); 1566 });
1567 } 1567 }
OLDNEW
« no previous file with comments | « utils/tests/pub/oauth2_test.dart ('k') | utils/tests/pub/yaml_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698