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

Unified Diff: chrome/browser/extensions/api/cookies/cookies_unittest.cc

Issue 1773133002: SameSite: Implement 'Strict'/'Lax' attribute parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke@ Created 4 years, 9 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
Index: chrome/browser/extensions/api/cookies/cookies_unittest.cc
diff --git a/chrome/browser/extensions/api/cookies/cookies_unittest.cc b/chrome/browser/extensions/api/cookies/cookies_unittest.cc
index ad3d8e9a47f5d3a5bfc7a191ca6d98bf9ee7bdbf..41ee79bcd496b69efcbba803fcbee7b54fb0ed28 100644
--- a/chrome/browser/extensions/api/cookies/cookies_unittest.cc
+++ b/chrome/browser/extensions/api/cookies/cookies_unittest.cc
@@ -85,7 +85,8 @@ TEST_F(ExtensionCookiesTest, StoreIdProfileConversion) {
TEST_F(ExtensionCookiesTest, ExtensionTypeCreation) {
net::CanonicalCookie canonical_cookie1(
GURL(), "ABC", "DEF", "www.foobar.com", "/", base::Time(), base::Time(),
- base::Time(), false, false, false, net::COOKIE_PRIORITY_DEFAULT);
+ base::Time(), false, false, net::CookieSameSite::DEFAULT_MODE,
+ net::COOKIE_PRIORITY_DEFAULT);
scoped_ptr<Cookie> cookie1(
cookies_helpers::CreateCookie(
canonical_cookie1, "some cookie store"));
@@ -102,8 +103,8 @@ TEST_F(ExtensionCookiesTest, ExtensionTypeCreation) {
net::CanonicalCookie canonical_cookie2(
GURL(), "ABC", "DEF", ".foobar.com", "/", base::Time(),
- base::Time::FromDoubleT(10000), base::Time(), false, false, false,
- net::COOKIE_PRIORITY_DEFAULT);
+ base::Time::FromDoubleT(10000), base::Time(), false, false,
+ net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT);
scoped_ptr<Cookie> cookie2(
cookies_helpers::CreateCookie(
canonical_cookie2, "some cookie store"));
@@ -124,14 +125,16 @@ TEST_F(ExtensionCookiesTest, ExtensionTypeCreation) {
TEST_F(ExtensionCookiesTest, GetURLFromCanonicalCookie) {
net::CanonicalCookie cookie1(GURL(), "ABC", "DEF", "www.foobar.com", "/",
base::Time(), base::Time(), base::Time(), false,
- false, false, net::COOKIE_PRIORITY_DEFAULT);
+ false, net::CookieSameSite::DEFAULT_MODE,
+ net::COOKIE_PRIORITY_DEFAULT);
EXPECT_EQ("http://www.foobar.com/",
cookies_helpers::GetURLFromCanonicalCookie(
cookie1).spec());
net::CanonicalCookie cookie2(GURL(), "ABC", "DEF", ".helloworld.com", "/",
base::Time(), base::Time(), base::Time(), true,
- false, false, net::COOKIE_PRIORITY_DEFAULT);
+ false, net::CookieSameSite::DEFAULT_MODE,
+ net::COOKIE_PRIORITY_DEFAULT);
EXPECT_EQ("https://helloworld.com/",
cookies_helpers::GetURLFromCanonicalCookie(
cookie2).spec());
@@ -167,10 +170,10 @@ TEST_F(ExtensionCookiesTest, DomainMatching) {
scoped_ptr<GetAll::Params> params(GetAll::Params::Create(args));
cookies_helpers::MatchFilter filter(&params->details);
- net::CanonicalCookie cookie(GURL(), std::string(), std::string(),
- tests[i].domain, std::string(), base::Time(),
- base::Time(), base::Time(), false, false, false,
- net::COOKIE_PRIORITY_DEFAULT);
+ net::CanonicalCookie cookie(
+ GURL(), std::string(), std::string(), tests[i].domain, std::string(),
+ base::Time(), base::Time(), base::Time(), false, false,
+ net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT);
EXPECT_EQ(tests[i].matches, filter.MatchesCookie(cookie));
}
}
@@ -178,8 +181,8 @@ TEST_F(ExtensionCookiesTest, DomainMatching) {
TEST_F(ExtensionCookiesTest, DecodeUTF8WithErrorHandling) {
net::CanonicalCookie canonical_cookie(
GURL(), std::string(), "011Q255bNX_1!yd\203e+", "test.com", "/path\203",
- base::Time(), base::Time(), base::Time(), false, false, false,
- net::COOKIE_PRIORITY_DEFAULT);
+ base::Time(), base::Time(), base::Time(), false, false,
+ net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT);
scoped_ptr<Cookie> cookie(
cookies_helpers::CreateCookie(
canonical_cookie, "some cookie store"));
« no previous file with comments | « chrome/browser/extensions/api/cookies/cookies_api.cc ('k') | components/signin/core/browser/gaia_cookie_manager_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698