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

Unified Diff: net/base/cookie_monster_unittest.cc

Issue 173296: Convert internal time format to Windows 1601 epoch on Linux & Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « chrome/test/data/profiles/typical_history/Default/History ('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 24094)
+++ net/base/cookie_monster_unittest.cc (working copy)
@@ -688,6 +688,17 @@
std::string(kValidCookieLine) +
"; expires=Mon, 18-Apr-1977 22:50:13 GMT"));
EXPECT_EQ("", cm.GetCookies(url_google));
+
+ // Create a persistent cookie.
+ EXPECT_TRUE(cm.SetCookie(url_google,
+ std::string(kValidCookieLine) +
+ "; expires=Mon, 18-Apr-22 22:50:13 GMT"));
+ EXPECT_EQ("A=B", cm.GetCookies(url_google));
+ // Delete it via Expires, with a unix epoch of 0.
+ EXPECT_TRUE(cm.SetCookie(url_google,
+ std::string(kValidCookieLine) +
+ "; expires=Thu, 1-Jan-1970 00:00:00 GMT"));
+ EXPECT_EQ("", cm.GetCookies(url_google));
}
TEST(CookieMonsterTest, TestCookieDeleteAll) {
« no previous file with comments | « chrome/test/data/profiles/typical_history/Default/History ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698