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

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

Issue 12021008: Use the dart:async Stream API thoroughly in Pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/tests/pub/curl_client_test.dart ('k') | utils/tests/pub/pub_uploader_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/oauth2_test.dart
diff --git a/utils/tests/pub/oauth2_test.dart b/utils/tests/pub/oauth2_test.dart
index 1c94c32e52b70618e43c035eebf0359ea9fbcb38..4f5373cd1156d02d4736d6d2244bb78fe758dcef 100644
--- a/utils/tests/pub/oauth2_test.dart
+++ b/utils/tests/pub/oauth2_test.dart
@@ -68,7 +68,7 @@ main() {
confirmPublish(pub);
server.handle('POST', '/token', (request, response) {
- return consumeInputStream(request.inputStream).then((bytes) {
+ return wrapInputStream(request.inputStream).toBytes().then((bytes) {
var body = new String.fromCharCodes(bytes);
expect(body, matches(
new RegExp(r'(^|&)refresh_token=refresh\+token(&|$)')));
@@ -209,7 +209,7 @@ void authorizePub(ScheduledProcess pub, ScheduledServer server,
void handleAccessTokenRequest(ScheduledServer server, String accessToken) {
server.handle('POST', '/token', (request, response) {
- return consumeInputStream(request.inputStream).then((bytes) {
+ return wrapInputStream(request.inputStream).toBytes().then((bytes) {
var body = new String.fromCharCodes(bytes);
expect(body, matches(new RegExp(r'(^|&)code=access\+code(&|$)')));
« no previous file with comments | « utils/tests/pub/curl_client_test.dart ('k') | utils/tests/pub/pub_uploader_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698