| Index: net/cookies/cookie_util_unittest.cc
|
| diff --git a/net/cookies/cookie_util_unittest.cc b/net/cookies/cookie_util_unittest.cc
|
| index fc2763146c9f7287261562ef3e17ffb642764ac1..392faf122c1caef7a8ca0aa285e55f1fa4224130 100644
|
| --- a/net/cookies/cookie_util_unittest.cc
|
| +++ b/net/cookies/cookie_util_unittest.cc
|
| @@ -43,8 +43,6 @@ void CheckSerialize(
|
| EXPECT_EQ(str_expected, net::cookie_util::SerializeRequestCookieLine(prc));
|
| }
|
|
|
| -} // namespace
|
| -
|
| TEST(CookieUtilTest, TestDomainIsHostOnly) {
|
| const struct {
|
| const char* str;
|
| @@ -194,3 +192,20 @@ TEST(CookieUtilTest, TestRequestCookieParsing) {
|
| CheckSerialize(tests[i].parsed, tests[i].str);
|
| }
|
| }
|
| +
|
| +TEST(CookieUtilTest, TestGetEffectiveDomain) {
|
| + // Note: registry_controlled_domains::GetDomainAndRegistry is tested in its
|
| + // own unittests.
|
| + EXPECT_EQ("example.com",
|
| + net::cookie_util::GetEffectiveDomain("http", "www.example.com"));
|
| + EXPECT_EQ("example.com",
|
| + net::cookie_util::GetEffectiveDomain("https", "www.example.com"));
|
| + EXPECT_EQ("example.com",
|
| + net::cookie_util::GetEffectiveDomain("ws", "www.example.com"));
|
| + EXPECT_EQ("example.com",
|
| + net::cookie_util::GetEffectiveDomain("wss", "www.example.com"));
|
| + EXPECT_EQ("www.example.com",
|
| + net::cookie_util::GetEffectiveDomain("ftp", "www.example.com"));
|
| +}
|
| +
|
| +} // namespace
|
|
|