Index: net/cookies/canonical_cookie_unittest.cc |
diff --git a/net/cookies/canonical_cookie_unittest.cc b/net/cookies/canonical_cookie_unittest.cc |
index 9b10d13ff3b7036ae73d9c244fa9ce20b62145da..58c12ca656d447040152e9bcb9b612918f07d179 100644 |
--- a/net/cookies/canonical_cookie_unittest.cc |
+++ b/net/cookies/canonical_cookie_unittest.cc |
@@ -84,7 +84,7 @@ TEST(CanonicalCookieTest, Create) { |
// Test creating http only cookies. |
CookieOptions first_party_options; |
- first_party_options.set_first_party_url(url); |
+ first_party_options.set_first_party(url::Origin(url)); |
cookie.reset(CanonicalCookie::Create(url, "A=2; First-Party-Only", |
creation_time, httponly_options)); |
EXPECT_TRUE(cookie.get()); |
@@ -351,26 +351,26 @@ TEST(CanonicalCookieTest, IncludeFirstPartyForFirstPartyURL) { |
cookie.reset(CanonicalCookie::Create(secure_url, "A=2; First-Party-Only", |
creation_time, options)); |
EXPECT_TRUE(cookie->IsFirstPartyOnly()); |
- options.set_first_party_url(GURL()); |
+ options.set_first_party(url::Origin()); |
EXPECT_FALSE(cookie->IncludeForRequestURL(secure_url, options)); |
// First-party-only cookies are included only if the cookie's origin matches |
// the |
// first-party origin. |
- options.set_first_party_url(secure_url); |
+ options.set_first_party(url::Origin(secure_url)); |
EXPECT_TRUE(cookie->IncludeForRequestURL(secure_url, options)); |
- options.set_first_party_url(insecure_url); |
+ options.set_first_party(url::Origin(insecure_url)); |
EXPECT_FALSE(cookie->IncludeForRequestURL(secure_url, options)); |
- options.set_first_party_url(third_party_url); |
+ options.set_first_party(url::Origin(third_party_url)); |
EXPECT_FALSE(cookie->IncludeForRequestURL(secure_url, options)); |
// "First-Party-Only" doesn't override the 'secure' flag. |
cookie.reset(CanonicalCookie::Create( |
secure_url, "A=2; Secure; First-Party-Only", creation_time, options)); |
- options.set_first_party_url(secure_url); |
+ options.set_first_party(url::Origin(secure_url)); |
EXPECT_TRUE(cookie->IncludeForRequestURL(secure_url, options)); |
EXPECT_FALSE(cookie->IncludeForRequestURL(insecure_url, options)); |
- options.set_first_party_url(insecure_url); |
+ options.set_first_party(url::Origin(insecure_url)); |
EXPECT_FALSE(cookie->IncludeForRequestURL(secure_url, options)); |
EXPECT_FALSE(cookie->IncludeForRequestURL(insecure_url, options)); |
@@ -378,10 +378,10 @@ TEST(CanonicalCookieTest, IncludeFirstPartyForFirstPartyURL) { |
cookie.reset(CanonicalCookie::Create(secure_url_with_path, |
"A=2; First-Party-Only; path=/foo/bar", |
creation_time, options)); |
- options.set_first_party_url(secure_url_with_path); |
+ options.set_first_party(url::Origin(secure_url_with_path)); |
EXPECT_TRUE(cookie->IncludeForRequestURL(secure_url_with_path, options)); |
EXPECT_FALSE(cookie->IncludeForRequestURL(secure_url, options)); |
- options.set_first_party_url(secure_url); |
+ options.set_first_party(url::Origin(secure_url)); |
EXPECT_TRUE(cookie->IncludeForRequestURL(secure_url_with_path, options)); |
EXPECT_FALSE(cookie->IncludeForRequestURL(secure_url, options)); |
} |