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

Unified Diff: net/http/http_auth_controller_unittest.cc

Issue 2382293004: [net/auth] Don't abort network transaction over non-permanent auth errors. (Closed)
Patch Set: Moar tests. Created 4 years, 2 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 | « net/http/http_auth_controller.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_controller_unittest.cc
diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc
index aeb6a1978ce9fab13bf5233a1788f7e551f85a3f..eeeb60a79753bd3f3a3c3f6a03517148b64361dc 100644
--- a/net/http/http_auth_controller_unittest.cc
+++ b/net/http/http_auth_controller_unittest.cc
@@ -114,8 +114,15 @@ TEST(HttpAuthControllerTest, PermanentErrors) {
// If a non-permanent error is returned by the handler, then the
// controller should report it unchanged.
- RunSingleRoundAuthTest(RUN_HANDLER_ASYNC, ERR_INVALID_AUTH_CREDENTIALS,
- ERR_INVALID_AUTH_CREDENTIALS, SCHEME_IS_ENABLED);
+ RunSingleRoundAuthTest(RUN_HANDLER_ASYNC, ERR_UNEXPECTED, ERR_UNEXPECTED,
+ SCHEME_IS_ENABLED);
+
+ // ERR_INVALID_AUTH_CREDENTIALS is special. It's a non-permanet error, but
+ // the error isn't propagated, nor is the auth scheme disabled. This allows
+ // the scheme to re-attempt the authentication attempt using a different set
+ // of credentials.
+ RunSingleRoundAuthTest(RUN_HANDLER_ASYNC, ERR_INVALID_AUTH_CREDENTIALS, OK,
+ SCHEME_IS_ENABLED);
}
// If an HttpAuthHandler indicates that it doesn't allow explicit
« no previous file with comments | « net/http/http_auth_controller.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698