summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 02:53:36 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 02:53:36 +0000
commita4a3292e978cca3ad8c0baa5205054b5b3802e64 (patch)
tree9490d74f9760c4b841f1188e13b1a91db374c327 /net
parent67d0d62d638f7b15e031dd2c22756df0109e021d (diff)
downloadchromium_src-a4a3292e978cca3ad8c0baa5205054b5b3802e64.zip
chromium_src-a4a3292e978cca3ad8c0baa5205054b5b3802e64.tar.gz
chromium_src-a4a3292e978cca3ad8c0baa5205054b5b3802e64.tar.bz2
Convert internal time format to Windows 1601 epoch on Linux & Mac.
Although we represent time internally starting from 1601, there are still things like time explosion that will not work before the year 1900. This limitation is the same as it was previously. BUG=14734 Review URL: http://codereview.chromium.org/173296 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/cookie_monster_unittest.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/base/cookie_monster_unittest.cc b/net/base/cookie_monster_unittest.cc
index bb36585..1f0b45d 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) {