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

Unified Diff: chrome/browser/chromeos/login/profile_auth_data_unittest.cc

Issue 1157333005: [net/http auth] Use strings to identify authentication schemes. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/browser/media/android/media_resource_getter_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/profile_auth_data_unittest.cc
diff --git a/chrome/browser/chromeos/login/profile_auth_data_unittest.cc b/chrome/browser/chromeos/login/profile_auth_data_unittest.cc
index 2973727bbd4a976f572beb055727dc8bdd06931e..bfc0b72a82653f2552810622ffaefe977bf9f57b 100644
--- a/chrome/browser/chromeos/login/profile_auth_data_unittest.cc
+++ b/chrome/browser/chromeos/login/profile_auth_data_unittest.cc
@@ -38,6 +38,7 @@ namespace chromeos {
namespace {
const char kProxyAuthURL[] = "http://example.com/";
+const char kProxyAuthScheme[] = "basic";
const char kProxyAuthRealm[] = "realm";
const char kProxyAuthChallenge[] = "challenge";
const char kProxyAuthPassword1[] = "password 1";
@@ -160,10 +161,8 @@ net::ChannelIDStore::ChannelIDList ProfileAuthDataTest::GetUserChannelIDs() {
void ProfileAuthDataTest::VerifyTransferredUserProxyAuthEntry() {
net::HttpAuthCache::Entry* entry =
- GetProxyAuth(&user_browser_context_)->Lookup(
- GURL(kProxyAuthURL),
- kProxyAuthRealm,
- net::HttpAuth::AUTH_SCHEME_BASIC);
+ GetProxyAuth(&user_browser_context_)
+ ->Lookup(GURL(kProxyAuthURL), kProxyAuthRealm, kProxyAuthScheme);
ASSERT_TRUE(entry);
EXPECT_EQ(base::ASCIIToUTF16(kProxyAuthPassword1),
entry->credentials().password());
@@ -200,14 +199,12 @@ void ProfileAuthDataTest::PopulateBrowserContext(
const std::string& proxy_auth_password,
const std::string& cookie_value,
scoped_ptr<crypto::ECPrivateKey> channel_id_key) {
- GetProxyAuth(browser_context)->Add(
- GURL(kProxyAuthURL),
- kProxyAuthRealm,
- net::HttpAuth::AUTH_SCHEME_BASIC,
- kProxyAuthChallenge,
- net::AuthCredentials(base::string16(),
- base::ASCIIToUTF16(proxy_auth_password)),
- std::string());
+ GetProxyAuth(browser_context)
+ ->Add(GURL(kProxyAuthURL), kProxyAuthRealm, kProxyAuthScheme,
+ kProxyAuthChallenge,
+ net::AuthCredentials(base::string16(),
+ base::ASCIIToUTF16(proxy_auth_password)),
+ std::string());
net::CookieMonster* cookies = GetCookies(browser_context);
// Ensure |cookies| is fully initialized.
« no previous file with comments | « no previous file | content/browser/media/android/media_resource_getter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698