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

Unified Diff: net/http/http_auth_handler_digest_unittest.cc

Issue 6525035: Invalidate credentials if the server rejects them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Defer browser tests to another CL Created 9 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
Index: net/http/http_auth_handler_digest_unittest.cc
diff --git a/net/http/http_auth_handler_digest_unittest.cc b/net/http/http_auth_handler_digest_unittest.cc
index 9b57c16e0eef21a7911681e7fe0728f2558f3a34..8464a53c7faccf21835d0c366536ade40e699e16 100644
--- a/net/http/http_auth_handler_digest_unittest.cc
+++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -553,6 +553,13 @@ TEST(HttpAuthHandlerDigest, HandleAnotherChallenge) {
stale_false_challenge.end());
EXPECT_EQ(HttpAuth::AUTHORIZATION_RESULT_REJECT,
handler->HandleAnotherChallenge(&tok_stale_false));
+
+ std::string realm_change_challenge =
+ "Digest realm=\"SomethingElse\", nonce=\"nonce-value2\"";
+ HttpAuth::ChallengeTokenizer tok_realm_change(realm_change_challenge.begin(),
+ realm_change_challenge.end());
+ EXPECT_EQ(HttpAuth::AUTHORIZATION_RESULT_DIFFERENT_REALM,
+ handler->HandleAnotherChallenge(&tok_realm_change));
}
TEST(HttpAuthHandlerDigest, RespondToServerChallenge) {
« net/http/http_auth_handler_digest.cc ('K') | « net/http/http_auth_handler_digest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698