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

Unified Diff: net/http/http_auth_handler_digest_unittest.cc

Issue 10854139: Use HttpAuthController in SocketStream (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased and Skipped added browser test on chromeos Created 8 years, 4 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_handler_digest.cc ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c5549e71d1e6c7f9571b49bb095a6bcd47721c06..55ef56584195f86d6aeb2af992dd368adc352f13 100644
--- a/net/http/http_auth_handler_digest_unittest.cc
+++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -632,6 +632,34 @@ TEST(HttpAuthHandlerDigest, RespondToProxyChallengeHttps) {
auth_token);
}
+TEST(HttpAuthHandlerDigest, RespondToProxyChallengeWs) {
+ std::string auth_token;
+ EXPECT_TRUE(RespondToChallenge(
+ HttpAuth::AUTH_PROXY,
+ "http://proxy.intranet.corp.com:3128",
+ "ws://www.example.com/echo",
+ kSimpleChallenge,
+ &auth_token));
+ EXPECT_EQ("Digest username=\"foo\", realm=\"Oblivion\", "
+ "nonce=\"nonce-value\", uri=\"www.example.com:80\", "
+ "response=\"aa1df184f68d5b6ab9d9aa4f88e41b4c\"",
+ auth_token);
+}
+
+TEST(HttpAuthHandlerDigest, RespondToProxyChallengeWss) {
+ std::string auth_token;
+ EXPECT_TRUE(RespondToChallenge(
+ HttpAuth::AUTH_PROXY,
+ "http://proxy.intranet.corp.com:3128",
+ "wss://www.example.com/echo",
+ kSimpleChallenge,
+ &auth_token));
+ EXPECT_EQ("Digest username=\"foo\", realm=\"Oblivion\", "
+ "nonce=\"nonce-value\", uri=\"www.example.com:443\", "
+ "response=\"3270da8467afbe9ddf2334a48d46e9b9\"",
+ auth_token);
+}
+
TEST(HttpAuthHandlerDigest, RespondToChallengeAuthQop) {
std::string auth_token;
EXPECT_TRUE(RespondToChallenge(
« no previous file with comments | « net/http/http_auth_handler_digest.cc ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698