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

Unified Diff: net/base/cookie_monster_unittest.cc

Issue 7831056: Fix a memory leak in a unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/base/cookie_monster_store_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cookie_monster_unittest.cc
===================================================================
--- net/base/cookie_monster_unittest.cc (revision 100188)
+++ net/base/cookie_monster_unittest.cc (working copy)
@@ -1294,18 +1294,19 @@
TEST_F(DeferredCookieTaskTest, DeferredDeleteCanonicalCookie) {
std::vector<CookieMonster::CanonicalCookie*> cookies;
- AddCookieToList("www.google.com", "X=1; path=/", base::Time::Now(), &cookies);
+ CookieMonster::CanonicalCookie cookie = BuildCanonicalCookie(
+ "www.google.com", "X=1; path=/", base::Time::Now());
MockDeleteCookieCallback delete_cookie_callback;
BeginWith(DeleteCanonicalCookieAction(
- &cookie_monster(), *cookies[0], &delete_cookie_callback));
+ &cookie_monster(), cookie, &delete_cookie_callback));
WaitForLoadCall();
EXPECT_CALL(delete_cookie_callback, Invoke(false)).WillOnce(
DeleteCanonicalCookieAction(
- &cookie_monster(), *cookies[0], &delete_cookie_callback));
+ &cookie_monster(), cookie, &delete_cookie_callback));
EXPECT_CALL(delete_cookie_callback, Invoke(false)).WillOnce(
QuitCurrentMessageLoop());
« no previous file with comments | « net/base/cookie_monster_store_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698