Index: net/cookies/cookie_store_unittest.h |
diff --git a/net/cookies/cookie_store_unittest.h b/net/cookies/cookie_store_unittest.h |
index e8ac988290c4e75984e17bc212b8249bf74ae6ca..0fd63047aba0dcf340036921179e8e9bee9c2266 100644 |
--- a/net/cookies/cookie_store_unittest.h |
+++ b/net/cookies/cookie_store_unittest.h |
@@ -588,9 +588,9 @@ TYPED_TEST_P(CookieStoreTest, DomainTest) { |
TYPED_TEST_P(CookieStoreTest, DomainWithTrailingDotTest) { |
CookieStore* cs = this->GetCookieStore(); |
EXPECT_FALSE(this->SetCookie(cs, this->http_www_google_.url(), |
- "a=1; domain=.www.google.com.")); |
+ "a=1; domain=.www.google.izzle.")); |
EXPECT_FALSE(this->SetCookie(cs, this->http_www_google_.url(), |
- "b=2; domain=.www.google.com..")); |
+ "b=2; domain=.www.google.izzle..")); |
this->MatchCookieLines(std::string(), |
this->GetCookies(cs, this->http_www_google_.url())); |
} |
@@ -696,11 +696,11 @@ TYPED_TEST_P(CookieStoreTest, DomainWithoutLeadingDotParentDomain) { |
// it as setting a domain cookie. |
TYPED_TEST_P(CookieStoreTest, DomainWithoutLeadingDotSameDomain) { |
CookieStore* cs = this->GetCookieStore(); |
- GURL url("http://www.google.com"); |
- EXPECT_TRUE(this->SetCookie(cs, url, "a=1; domain=www.google.com")); |
+ GURL url("http://www.google.izzle"); |
+ EXPECT_TRUE(this->SetCookie(cs, url, "a=1; domain=www.google.izzle")); |
this->MatchCookieLines("a=1", this->GetCookies(cs, url)); |
this->MatchCookieLines( |
- "a=1", this->GetCookies(cs, GURL("http://sub.www.google.com"))); |
+ "a=1", this->GetCookies(cs, GURL("http://sub.www.google.izzle"))); |
this->MatchCookieLines( |
std::string(), this->GetCookies(cs, GURL("http://something-else.com"))); |
} |
@@ -708,9 +708,9 @@ TYPED_TEST_P(CookieStoreTest, DomainWithoutLeadingDotSameDomain) { |
// Test that the domain specified in cookie string is treated case-insensitive |
TYPED_TEST_P(CookieStoreTest, CaseInsensitiveDomainTest) { |
CookieStore* cs = this->GetCookieStore(); |
- GURL url("http://www.google.com"); |
- EXPECT_TRUE(this->SetCookie(cs, url, "a=1; domain=.GOOGLE.COM")); |
- EXPECT_TRUE(this->SetCookie(cs, url, "b=2; domain=.wWw.gOOgLE.coM")); |
+ GURL url("http://www.google.izzle"); |
+ EXPECT_TRUE(this->SetCookie(cs, url, "a=1; domain=.GOOGLE.IZZLE")); |
+ EXPECT_TRUE(this->SetCookie(cs, url, "b=2; domain=.wWw.gOOgLE.izzLE")); |
Randy Smith (Not in Mondays)
2017/06/08 15:47:28
Only location that wasn't a straight query replace
|
this->MatchCookieLines("a=1; b=2", this->GetCookies(cs, url)); |
} |
@@ -784,7 +784,7 @@ TYPED_TEST_P(CookieStoreTest, TestSubdomainSettingCookiesOnUnknownTLD) { |
TYPED_TEST_P(CookieStoreTest, TestSubdomainSettingCookiesOnKnownTLD) { |
CookieStore* cs = this->GetCookieStore(); |
- GURL url("http://google.com"); |
+ GURL url("http://google.izzle"); |
EXPECT_FALSE(this->SetCookie(cs, url, "a=1; domain=.com")); |
EXPECT_FALSE(this->SetCookie(cs, url, "b=2; domain=com")); |
this->MatchCookieLines(std::string(), this->GetCookies(cs, url)); |
@@ -832,27 +832,29 @@ TYPED_TEST_P(CookieStoreTest, TestSettingCookiesWithHostDomainOnUnknownTLD) { |
} |
// Test reading/writing cookies when the domain ends with a period, |
-// as in "www.google.com." |
+// as in "www.google.izzle." |
TYPED_TEST_P(CookieStoreTest, TestHostEndsWithDot) { |
CookieStore* cs = this->GetCookieStore(); |
- GURL url("http://www.google.com"); |
- GURL url_with_dot("http://www.google.com."); |
+ GURL url("http://www.google.izzle"); |
+ GURL url_with_dot("http://www.google.izzle."); |
EXPECT_TRUE(this->SetCookie(cs, url, "a=1")); |
this->MatchCookieLines("a=1", this->GetCookies(cs, url)); |
// Do not share cookie space with the dot version of domain. |
// Note: this is not what FireFox does, but it _is_ what IE+Safari do. |
if (TypeParam::preserves_trailing_dots) { |
- EXPECT_FALSE(this->SetCookie(cs, url, "b=2; domain=.www.google.com.")); |
+ EXPECT_FALSE(this->SetCookie(cs, url, "b=2; domain=.www.google.izzle.")); |
this->MatchCookieLines("a=1", this->GetCookies(cs, url)); |
- EXPECT_TRUE(this->SetCookie(cs, url_with_dot, "b=2; domain=.google.com.")); |
+ EXPECT_TRUE( |
+ this->SetCookie(cs, url_with_dot, "b=2; domain=.google.izzle.")); |
this->MatchCookieLines("b=2", this->GetCookies(cs, url_with_dot)); |
} else { |
- EXPECT_TRUE(this->SetCookie(cs, url, "b=2; domain=.www.google.com.")); |
+ EXPECT_TRUE(this->SetCookie(cs, url, "b=2; domain=.www.google.izzle.")); |
this->MatchCookieLines("a=1 b=2", this->GetCookies(cs, url)); |
// Setting this cookie should fail, since the trailing dot on the domain |
// isn't preserved, and then the domain mismatches the URL. |
- EXPECT_FALSE(this->SetCookie(cs, url_with_dot, "b=2; domain=.google.com.")); |
+ EXPECT_FALSE( |
+ this->SetCookie(cs, url_with_dot, "b=2; domain=.google.izzle.")); |
} |
// Make sure there weren't any side effects. |
@@ -1223,7 +1225,7 @@ TYPED_TEST_P(CookieStoreTest, NetUtilCookieTest) { |
} |
TYPED_TEST_P(CookieStoreTest, OverwritePersistentCookie) { |
- GURL url_google("http://www.google.com/"); |
+ GURL url_google("http://www.google.izzle/"); |
GURL url_chromium("http://chromium.org"); |
CookieStore* cs = this->GetCookieStore(); |
@@ -1266,14 +1268,14 @@ TYPED_TEST_P(CookieStoreTest, OverwritePersistentCookie) { |
if (TypeParam::supports_http_only) { |
this->MatchCookieLines( |
- "a=val33", this->GetCookies(cs, GURL("http://www.google.com/path1"))); |
+ "a=val33", this->GetCookies(cs, GURL("http://www.google.izzle/path1"))); |
} else { |
this->MatchCookieLines( |
"a=val33; b=val2", |
- this->GetCookies(cs, GURL("http://www.google.com/path1"))); |
+ this->GetCookies(cs, GURL("http://www.google.izzle/path1"))); |
} |
this->MatchCookieLines( |
- "a=val9", this->GetCookies(cs, GURL("http://www.google.com/path2"))); |
+ "a=val9", this->GetCookies(cs, GURL("http://www.google.izzle/path2"))); |
this->MatchCookieLines( |
"a=val99", this->GetCookies(cs, GURL("http://chromium.org/path1"))); |
} |
@@ -1283,30 +1285,32 @@ TYPED_TEST_P(CookieStoreTest, CookieOrdering) { |
// the right order. |
// Cookies should be sorted by path length and creation time, as per RFC6265. |
CookieStore* cs = this->GetCookieStore(); |
- EXPECT_TRUE( |
- this->SetCookie(cs, GURL("http://d.c.b.a.google.com/aa/x.html"), "c=1")); |
- EXPECT_TRUE(this->SetCookie(cs, GURL("http://b.a.google.com/aa/bb/cc/x.html"), |
- "d=1; domain=b.a.google.com")); |
+ EXPECT_TRUE(this->SetCookie(cs, GURL("http://d.c.b.a.google.izzle/aa/x.html"), |
+ "c=1")); |
+ EXPECT_TRUE(this->SetCookie(cs, |
+ GURL("http://b.a.google.izzle/aa/bb/cc/x.html"), |
+ "d=1; domain=b.a.google.izzle")); |
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds( |
TypeParam::creation_time_granularity_in_ms)); |
- EXPECT_TRUE(this->SetCookie(cs, GURL("http://b.a.google.com/aa/bb/cc/x.html"), |
- "a=4; domain=b.a.google.com")); |
+ EXPECT_TRUE(this->SetCookie(cs, |
+ GURL("http://b.a.google.izzle/aa/bb/cc/x.html"), |
+ "a=4; domain=b.a.google.izzle")); |
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds( |
TypeParam::creation_time_granularity_in_ms)); |
EXPECT_TRUE(this->SetCookie(cs, |
- GURL("http://c.b.a.google.com/aa/bb/cc/x.html"), |
- "e=1; domain=c.b.a.google.com")); |
+ GURL("http://c.b.a.google.izzle/aa/bb/cc/x.html"), |
+ "e=1; domain=c.b.a.google.izzle")); |
EXPECT_TRUE(this->SetCookie( |
- cs, GURL("http://d.c.b.a.google.com/aa/bb/x.html"), "b=1")); |
+ cs, GURL("http://d.c.b.a.google.izzle/aa/bb/x.html"), "b=1")); |
EXPECT_TRUE(this->SetCookie(cs, GURL("http://news.bbc.co.uk/midpath/x.html"), |
"g=10")); |
EXPECT_EQ( |
"d=1; a=4; e=1; b=1; c=1", |
- this->GetCookies(cs, GURL("http://d.c.b.a.google.com/aa/bb/cc/dd"))); |
+ this->GetCookies(cs, GURL("http://d.c.b.a.google.izzle/aa/bb/cc/dd"))); |
CookieOptions options; |
CookieList cookies = this->GetCookieListWithOptions( |
- cs, GURL("http://d.c.b.a.google.com/aa/bb/cc/dd"), options); |
+ cs, GURL("http://d.c.b.a.google.izzle/aa/bb/cc/dd"), options); |
CookieList::const_iterator it = cookies.begin(); |
ASSERT_TRUE(it != cookies.end()); |