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

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

Issue 11416352: Handle OAuth2 AuthorizationExceptions in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« utils/tests/pub/pub_lish_test.dart ('K') | « utils/tests/pub/pub_lish_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/test_pub.dart
diff --git a/utils/tests/pub/test_pub.dart b/utils/tests/pub/test_pub.dart
index ef6cd7f6d76f450822704007d232e8f052cdbd40..fe7c2b701eceae4cdb5ab3e8b4aca82984431e54 100644
--- a/utils/tests/pub/test_pub.dart
+++ b/utils/tests/pub/test_pub.dart
@@ -526,7 +526,10 @@ void run() {
registerException(error, future.stackTrace);
return true;
});
- future.then((_) => registerException(error, future.stackTrace));
+ future.then((_) {
+ print("Registering exception");
+ registerException(error, future.stackTrace);
+ });
return true;
});
@@ -1459,11 +1462,10 @@ class ScheduledServer {
/// Raises an error complaining of an unexpected request.
void _awaitHandle(HttpRequest request, HttpResponse response) {
var future = timeout(new Future.immediate(null).chain((_) {
- var handlerFuture = _handlers.removeFirst();
- if (handlerFuture == null) {
+ if (_handlers.isEmpty) {
fail('Unexpected ${request.method} request to ${request.path}.');
}
- return handlerFuture;
+ return _handlers.removeFirst();
}).transform((handler) {
handler(request, response);
}), 5000, "waiting for a handler for ${request.method} ${request.path}");
« utils/tests/pub/pub_lish_test.dart ('K') | « utils/tests/pub/pub_lish_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698