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

Unified Diff: net/base/cookie_monster_unittest.cc

Issue 150097: Convert Linux internal time format to Windows 1601 epoch. (Closed)
Patch Set: Apply mac patch Created 11 years, 5 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 | « base/time_unittest.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
diff --git a/net/base/cookie_monster_unittest.cc b/net/base/cookie_monster_unittest.cc
index d650d0f24936aa114161b4c390f07cb0b2794876..1ebeda942482057d6a5c75d93f2ca6a9117998c1 100644
--- a/net/base/cookie_monster_unittest.cc
+++ b/net/base/cookie_monster_unittest.cc
@@ -688,6 +688,17 @@ TEST(CookieMonsterTest, TestCookieDeletion) {
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 | « base/time_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698