Index: net/cookies/cookie_monster_unittest.cc |
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc |
index 0b60812a4415f788f663da2d745ee87318b4dd2b..6878898f63df1b5b784b997fe0258e4248b39cd9 100644 |
--- a/net/cookies/cookie_monster_unittest.cc |
+++ b/net/cookies/cookie_monster_unittest.cc |
@@ -148,6 +148,20 @@ class CookieMonsterTestBase : public CookieStoreTest<T> { |
return callback.result(); |
} |
+ bool SetCanonicalCookie(std::unique_ptr<CookieMonster> cm, |
+ std::unique_ptr<CanonicalCookie> cookie, |
+ bool secure_source, |
+ bool modify_http_only) { |
+ DCHECK(cm); |
+ ResultSavingCookieCallback<bool> callback; |
+ cm->SetCanonicalCookieAsync( |
+ std::move(cookie), secure_source, modify_http_only, |
+ base::Bind(&ResultSavingCookieCallback<bool>::Run, |
+ base::Unretained(&callback))); |
+ callback.WaitUntilDone(); |
+ return callback.result(); |
+ } |
+ |
int DeleteAllCreatedBetween(CookieMonster* cm, |
const base::Time& delete_begin, |
const base::Time& delete_end) { |
@@ -2303,7 +2317,7 @@ TEST_F(CookieMonsterTest, WhileLoadingDeleteAllGetForURL) { |
// When passed to the CookieMonster, it takes ownership of the pointed to |
// cookies. |
cookies.push_back( |
- CanonicalCookie::Create(kUrl, "a=b", base::Time(), CookieOptions())); |
+ CanonicalCookie::Create(kUrl, "a=b", base::Time::Now(), CookieOptions())); |
ASSERT_TRUE(cookies[0]); |
store->commands()[0].loaded_callback.Run(std::move(cookies)); |