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

Unified Diff: net/cookies/canonical_cookie_unittest.cc

Issue 1253353004: WIP: Teach "First-Party-Only" cookies about the requestor origin. Base URL: https://chromium.googlesource.com/chromium/src.git@cookie-options
Patch Set: Created 5 years, 5 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 | « net/cookies/canonical_cookie.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/canonical_cookie_unittest.cc
diff --git a/net/cookies/canonical_cookie_unittest.cc b/net/cookies/canonical_cookie_unittest.cc
index fc0d45374cd89b4c05cb754873555a9e8d327d31..c28f8da4ff0c1fcd186eaedc0c69b328038a8f77 100644
--- a/net/cookies/canonical_cookie_unittest.cc
+++ b/net/cookies/canonical_cookie_unittest.cc
@@ -365,9 +365,11 @@ TEST(CanonicalCookieTest, IncludeFirstPartyForFirstPartyURL) {
GURL secure_url_with_path("https://example.test/foo/bar/index.html");
GURL third_party_url("https://not-example.test");
base::Time creation_time = base::Time::Now();
- CookieOptions options;
scoped_ptr<CanonicalCookie> cookie;
+ CookieOptions options;
+ options.set_requestor_origin(url::Origin(secure_url));
+
// First-party-only cookies are not inlcuded if a top-level URL is unset.
cookie.reset(CanonicalCookie::Create(secure_url, "A=2; First-Party-Only",
creation_time, options));
« no previous file with comments | « net/cookies/canonical_cookie.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698