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

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

Issue 12191008: Get the pub oauth2 test passing locally. (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/pub/utils.dart ('k') | utils/tests/pub/test_pub.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 4529760e8ca050c12178d397906ef35b9c938962..62d4f9135e75ce28949b54028295f6b471fe4d76 100644
--- a/utils/tests/pub/oauth2_test.dart
+++ b/utils/tests/pub/oauth2_test.dart
@@ -31,7 +31,9 @@ main() {
response.outputStream.close();
});
- pub.kill();
+ // After we give pub an invalid response, it should crash. We wait for it to
+ // do so rather than killing it so it'll write out the credentials file.
+ pub.shouldExit(1);
Bob Nystrom 2013/02/05 00:53:22 Maybe add a pub.shouldFail(1) method so you don't
nweiz 2013/02/05 00:57:18 I don't think that makes sense to put on the actua
credentialsFile(server, 'access token').scheduleValidate();
});
@@ -112,7 +114,9 @@ main() {
response.outputStream.close();
});
- pub.kill();
+ // After we give pub an invalid response, it should crash. We wait for it to
+ // do so rather than killing it so it'll write out the credentials file.
+ pub.shouldExit(1);
credentialsFile(server, 'new access token').scheduleValidate();
});
@@ -135,7 +139,10 @@ main() {
response.outputStream.close();
});
- pub.kill();
+
+ // After we give pub an invalid response, it should crash. We wait for it to
+ // do so rather than killing it so it'll write out the credentials file.
+ pub.shouldExit(1);
credentialsFile(server, 'new access token').scheduleValidate();
});
@@ -190,7 +197,7 @@ void authorizePub(ScheduledProcess pub, ScheduledServer server,
.send();
}).then((response) {
expect(response.headers['location'],
- equals(['http://pub.dartlang.org/authorized']));
+ equals('http://pub.dartlang.org/authorized'));
}), anything);
handleAccessTokenRequest(server, accessToken);
« no previous file with comments | « utils/pub/utils.dart ('k') | utils/tests/pub/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698