Index: net/http/http_auth_cache_unittest.cc |
diff --git a/net/http/http_auth_cache_unittest.cc b/net/http/http_auth_cache_unittest.cc |
index 18866eaabb072ae46fc843d79f9985166ac91b2e..e064ee01befc116266d3e2337219a3b9b39d6dbd 100644 |
--- a/net/http/http_auth_cache_unittest.cc |
+++ b/net/http/http_auth_cache_unittest.cc |
@@ -79,7 +79,7 @@ AuthCredentials CreateASCIICredentials(const char* username, |
// Test adding and looking-up cache entries (both by realm and by path). |
TEST(HttpAuthCacheTest, Basic) { |
- GURL origin("http://www.google.com"); |
+ url::Origin origin("http://www.google.com"); |
HttpAuthCache cache; |
HttpAuthCache::Entry* entry; |
@@ -141,18 +141,18 @@ TEST(HttpAuthCacheTest, Basic) { |
EXPECT_TRUE(NULL == entry); |
// While Realm3 does exist, the origin scheme is wrong. |
- entry = cache.Lookup(GURL("https://www.google.com"), kRealm3, |
+ entry = cache.Lookup(url::Origin("https://www.google.com"), kRealm3, |
HttpAuth::AUTH_SCHEME_BASIC); |
EXPECT_TRUE(NULL == entry); |
// Realm, origin scheme ok, authentication scheme wrong |
- entry = cache.Lookup |
- (GURL("http://www.google.com"), kRealm1, HttpAuth::AUTH_SCHEME_DIGEST); |
+ entry = cache.Lookup(url::Origin("http://www.google.com"), kRealm1, |
+ HttpAuth::AUTH_SCHEME_DIGEST); |
EXPECT_TRUE(NULL == entry); |
// Valid lookup by origin, realm, scheme. |
- entry = cache.Lookup( |
- GURL("http://www.google.com:80"), kRealm3, HttpAuth::AUTH_SCHEME_BASIC); |
+ entry = cache.Lookup(url::Origin("http://www.google.com:80"), kRealm3, |
+ HttpAuth::AUTH_SCHEME_BASIC); |
ASSERT_FALSE(NULL == entry); |
EXPECT_EQ(HttpAuth::AUTH_SCHEME_BASIC, entry->scheme()); |
EXPECT_EQ(kRealm3, entry->realm()); |
@@ -163,8 +163,8 @@ TEST(HttpAuthCacheTest, Basic) { |
// Valid lookup by origin, realm, scheme when there's a duplicate |
// origin, realm in the cache |
- entry = cache.Lookup( |
- GURL("http://www.google.com:80"), kRealm3, HttpAuth::AUTH_SCHEME_DIGEST); |
+ entry = cache.Lookup(url::Origin("http://www.google.com:80"), kRealm3, |
+ HttpAuth::AUTH_SCHEME_DIGEST); |
ASSERT_FALSE(NULL == entry); |
EXPECT_EQ(HttpAuth::AUTH_SCHEME_DIGEST, entry->scheme()); |
EXPECT_EQ(kRealm3, entry->realm()); |
@@ -277,7 +277,7 @@ TEST(HttpAuthCacheTest, AddPath) { |
// path. |
TEST(HttpAuthCacheTest, AddToExistingEntry) { |
HttpAuthCache cache; |
- GURL origin("http://www.foobar.com:70"); |
+ url::Origin origin("http://www.foobar.com:70"); |
const std::string auth_challenge = "Basic realm=MyRealm"; |
scoped_ptr<HttpAuthHandler> handler( |
@@ -304,7 +304,7 @@ TEST(HttpAuthCacheTest, AddToExistingEntry) { |
} |
TEST(HttpAuthCacheTest, Remove) { |
- GURL origin("http://foobar2.com"); |
+ url::Origin origin("http://foobar2.com"); |
scoped_ptr<HttpAuthHandler> realm1_handler( |
new MockAuthHandler( |
@@ -341,8 +341,7 @@ TEST(HttpAuthCacheTest, Remove) { |
AuthCredentials(kAlice, k123))); |
// Fails because the origin is wrong. |
- EXPECT_FALSE(cache.Remove(GURL("http://foobar2.com:100"), |
- kRealm1, |
+ EXPECT_FALSE(cache.Remove(url::Origin("http://foobar2.com:100"), kRealm1, |
HttpAuth::AUTH_SCHEME_BASIC, |
AuthCredentials(kAlice, k123))); |
@@ -393,7 +392,7 @@ TEST(HttpAuthCacheTest, Remove) { |
TEST(HttpAuthCacheTest, UpdateStaleChallenge) { |
HttpAuthCache cache; |
- GURL origin("http://foobar2.com"); |
+ url::Origin origin("http://foobar2.com"); |
scoped_ptr<HttpAuthHandler> digest_handler( |
new MockAuthHandler( |
HttpAuth::AUTH_SCHEME_DIGEST, kRealm1, HttpAuth::AUTH_PROXY)); |
@@ -441,7 +440,7 @@ TEST(HttpAuthCacheTest, UpdateStaleChallenge) { |
} |
TEST(HttpAuthCacheTest, UpdateAllFrom) { |
- GURL origin("http://example.com"); |
+ url::Origin origin("http://example.com"); |
std::string path("/some/path"); |
std::string another_path("/another/path"); |
@@ -575,7 +574,7 @@ class HttpAuthCacheEvictionTest : public testing::Test { |
} |
} |
- GURL origin_; |
+ url::Origin origin_; |
HttpAuthCache cache_; |
static const int kMaxPaths = HttpAuthCache::kMaxNumPathsPerRealmEntry; |