Index: sdk/lib/_internal/pub_generated/test/oauth2/utils.dart |
diff --git a/sdk/lib/_internal/pub/test/oauth2/utils.dart b/sdk/lib/_internal/pub_generated/test/oauth2/utils.dart |
similarity index 73% |
copy from sdk/lib/_internal/pub/test/oauth2/utils.dart |
copy to sdk/lib/_internal/pub_generated/test/oauth2/utils.dart |
index d69941b39b81b187f908068116b073c59a4ed8a8..8c6f82494581c7972560e89ba1d6a0dfa3c80911 100644 |
--- a/sdk/lib/_internal/pub/test/oauth2/utils.dart |
+++ b/sdk/lib/_internal/pub_generated/test/oauth2/utils.dart |
@@ -15,22 +15,25 @@ import 'package:shelf/shelf.dart' as shelf; |
import '../../lib/src/utils.dart'; |
void authorizePub(ScheduledProcess pub, ScheduledServer server, |
- [String accessToken="access token"]) { |
- pub.stdout.expect('Pub needs your authorization to upload packages on your ' |
- 'behalf.'); |
+ [String accessToken = "access token"]) { |
+ pub.stdout.expect( |
+ 'Pub needs your authorization to upload packages on your ' 'behalf.'); |
schedule(() { |
return pub.stdout.next().then((line) { |
- var match = new RegExp(r'[?&]redirect_uri=([0-9a-zA-Z.%+-]+)[$&]') |
- .firstMatch(line); |
+ var match = |
+ new RegExp(r'[?&]redirect_uri=([0-9a-zA-Z.%+-]+)[$&]').firstMatch(line); |
expect(match, isNotNull); |
var redirectUrl = Uri.parse(Uri.decodeComponent(match.group(1))); |
- redirectUrl = addQueryParameters(redirectUrl, {'code': 'access code'}); |
- return (new http.Request('GET', redirectUrl)..followRedirects = false) |
- .send(); |
+ redirectUrl = addQueryParameters(redirectUrl, { |
+ 'code': 'access code' |
+ }); |
+ return (new http.Request('GET', redirectUrl)..followRedirects = |
+ false).send(); |
}).then((response) { |
- expect(response.headers['location'], |
+ expect( |
+ response.headers['location'], |
equals('http://pub.dartlang.org/authorized')); |
}); |
}); |
@@ -46,7 +49,9 @@ void handleAccessTokenRequest(ScheduledServer server, String accessToken) { |
return new shelf.Response.ok(JSON.encode({ |
"access_token": accessToken, |
"token_type": "bearer" |
- }), headers: {'content-type': 'application/json'}); |
+ }), headers: { |
+ 'content-type': 'application/json' |
+ }); |
}); |
}); |
} |