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

Unified Diff: net/http/http_auth_controller_unittest.cc

Issue 2432873003: [Merge-54][net/auth] Don't abort network transaction over non-permanent auth errors. (Closed)
Patch Set: 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 b3d1ca3c7a6fc3a85b7b605de0fd9a8a545af9e5..5cac8a7f89c288aec970c14325e25f2e5dc78abc 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