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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 1414313002: Allow dynamic updating of authentication policies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing Chromeos includes Created 5 years, 1 month 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_network_transaction_unittest.cc
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 56f3bb3d171cb944c83b8ff0fd5882f6f9b2b850..271a7bcebada8efff6af1785da67935e079551df 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -641,7 +641,7 @@ bool CheckBasicServerAuth(const AuthChallengeInfo* auth_challenge) {
EXPECT_FALSE(auth_challenge->is_proxy);
EXPECT_EQ("www.example.org:80", auth_challenge->challenger.ToString());
EXPECT_EQ("MyRealm1", auth_challenge->realm);
- EXPECT_EQ("basic", auth_challenge->scheme);
+ EXPECT_EQ(kBasicAuthScheme, auth_challenge->scheme);
return true;
}
@@ -651,7 +651,7 @@ bool CheckBasicProxyAuth(const AuthChallengeInfo* auth_challenge) {
EXPECT_TRUE(auth_challenge->is_proxy);
EXPECT_EQ("myproxy:70", auth_challenge->challenger.ToString());
EXPECT_EQ("MyRealm1", auth_challenge->realm);
- EXPECT_EQ("basic", auth_challenge->scheme);
+ EXPECT_EQ(kBasicAuthScheme, auth_challenge->scheme);
return true;
}
@@ -661,7 +661,7 @@ bool CheckDigestServerAuth(const AuthChallengeInfo* auth_challenge) {
EXPECT_FALSE(auth_challenge->is_proxy);
EXPECT_EQ("www.example.org:80", auth_challenge->challenger.ToString());
EXPECT_EQ("digestive", auth_challenge->realm);
- EXPECT_EQ("digest", auth_challenge->scheme);
+ EXPECT_EQ(kDigestAuthScheme, auth_challenge->scheme);
return true;
}
@@ -672,7 +672,7 @@ bool CheckNTLMServerAuth(const AuthChallengeInfo* auth_challenge) {
EXPECT_FALSE(auth_challenge->is_proxy);
EXPECT_EQ("172.22.68.17:80", auth_challenge->challenger.ToString());
EXPECT_EQ(std::string(), auth_challenge->realm);
- EXPECT_EQ("ntlm", auth_challenge->scheme);
+ EXPECT_EQ(kNtlmAuthScheme, auth_challenge->scheme);
return true;
}
#endif // defined(NTLM_PORTABLE)
@@ -6509,7 +6509,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthCacheAndPreauth) {
EXPECT_EQ("www.example.org:80",
response->auth_challenge->challenger.ToString());
EXPECT_EQ("MyRealm2", response->auth_challenge->realm);
- EXPECT_EQ("basic", response->auth_challenge->scheme);
+ EXPECT_EQ(kBasicAuthScheme, response->auth_challenge->scheme);
TestCompletionCallback callback2;
@@ -9349,7 +9349,7 @@ TEST_P(HttpNetworkTransactionTest, ChangeAuthRealms) {
EXPECT_FALSE(challenge->is_proxy);
EXPECT_EQ("www.example.org:80", challenge->challenger.ToString());
EXPECT_EQ("first_realm", challenge->realm);
- EXPECT_EQ("basic", challenge->scheme);
+ EXPECT_EQ(kBasicAuthScheme, challenge->scheme);
// Issue the second request with an incorrect password. There should be a
// password prompt for second_realm waiting to be filled in after the
@@ -9367,7 +9367,7 @@ TEST_P(HttpNetworkTransactionTest, ChangeAuthRealms) {
EXPECT_FALSE(challenge->is_proxy);
EXPECT_EQ("www.example.org:80", challenge->challenger.ToString());
EXPECT_EQ("second_realm", challenge->realm);
- EXPECT_EQ("basic", challenge->scheme);
+ EXPECT_EQ(kBasicAuthScheme, challenge->scheme);
// Issue the third request with another incorrect password. There should be
// a password prompt for first_realm waiting to be filled in. If the password
@@ -9386,7 +9386,7 @@ TEST_P(HttpNetworkTransactionTest, ChangeAuthRealms) {
EXPECT_FALSE(challenge->is_proxy);
EXPECT_EQ("www.example.org:80", challenge->challenger.ToString());
EXPECT_EQ("first_realm", challenge->realm);
- EXPECT_EQ("basic", challenge->scheme);
+ EXPECT_EQ(kBasicAuthScheme, challenge->scheme);
// Issue the fourth request with the correct password and username.
TestCompletionCallback callback4;

Powered by Google App Engine
This is Rietveld 408576698