OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_COOKIES_COOKIE_STORE_UNITTEST_H_ | 5 #ifndef NET_COOKIES_COOKIE_STORE_UNITTEST_H_ |
6 #define NET_COOKIES_COOKIE_STORE_UNITTEST_H_ | 6 #define NET_COOKIES_COOKIE_STORE_UNITTEST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 cs, this->www_google_foo_.url(), "A=", "B", std::string(), "foo", | 381 cs, this->www_google_foo_.url(), "A=", "B", std::string(), "foo", |
382 base::Time(), base::Time(), base::Time(), false, false, | 382 base::Time(), base::Time(), base::Time(), false, false, |
383 CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT)); | 383 CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT)); |
384 | 384 |
385 // Get all the cookies for a given URL, regardless of properties. This 'get()' | 385 // Get all the cookies for a given URL, regardless of properties. This 'get()' |
386 // operation shouldn't update the access time, as the test checks that the | 386 // operation shouldn't update the access time, as the test checks that the |
387 // access time is set properly upon creation. Updating the access time would | 387 // access time is set properly upon creation. Updating the access time would |
388 // make that difficult. | 388 // make that difficult. |
389 CookieOptions options; | 389 CookieOptions options; |
390 options.set_include_httponly(); | 390 options.set_include_httponly(); |
391 options.set_include_same_site(); | 391 options.set_same_site_mode( |
| 392 CookieOptions::SameSiteMode::INCLUDE_STRICT_AND_LAX); |
392 options.set_do_not_update_access_time(); | 393 options.set_do_not_update_access_time(); |
393 | 394 |
394 CookieList cookies = | 395 CookieList cookies = |
395 this->GetCookieListWithOptions(cs, this->www_google_foo_.url(), options); | 396 this->GetCookieListWithOptions(cs, this->www_google_foo_.url(), options); |
396 CookieList::iterator it = cookies.begin(); | 397 CookieList::iterator it = cookies.begin(); |
397 | 398 |
398 ASSERT_TRUE(it != cookies.end()); | 399 ASSERT_TRUE(it != cookies.end()); |
399 EXPECT_EQ("A", it->Name()); | 400 EXPECT_EQ("A", it->Name()); |
400 EXPECT_EQ("B", it->Value()); | 401 EXPECT_EQ("B", it->Value()); |
401 EXPECT_EQ(this->www_google_foo_.host(), it->Domain()); | 402 EXPECT_EQ(this->www_google_foo_.host(), it->Domain()); |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 OverwritePersistentCookie, | 1378 OverwritePersistentCookie, |
1378 CookieOrdering, | 1379 CookieOrdering, |
1379 GetAllCookiesAsync, | 1380 GetAllCookiesAsync, |
1380 DeleteCookieAsync, | 1381 DeleteCookieAsync, |
1381 DeleteCanonicalCookieAsync, | 1382 DeleteCanonicalCookieAsync, |
1382 DeleteSessionCookie); | 1383 DeleteSessionCookie); |
1383 | 1384 |
1384 } // namespace net | 1385 } // namespace net |
1385 | 1386 |
1386 #endif // NET_COOKIES_COOKIE_STORE_UNITTEST_H_ | 1387 #endif // NET_COOKIES_COOKIE_STORE_UNITTEST_H_ |
OLD | NEW |