summaryrefslogtreecommitdiffstats
path: root/net/cookies/cookie_store_unittest.h
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-13 20:25:07 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-13 20:25:07 +0000
commit348dd666bf9970bd16f769de98ae2df59735f1f3 (patch)
treef2176fb41def258f3329841060e89009d72e24f4 /net/cookies/cookie_store_unittest.h
parentb76fdd78b22b7fa75f4cb02e78e53a93c769f63d (diff)
downloadchromium_src-348dd666bf9970bd16f769de98ae2df59735f1f3.zip
chromium_src-348dd666bf9970bd16f769de98ae2df59735f1f3.tar.gz
chromium_src-348dd666bf9970bd16f769de98ae2df59735f1f3.tar.bz2
Ignore an empty expiry attribute, as per RFC.
Original issue with LGTM is at https://codereview.chromium.org/12635007/ but was based on a branch. Creating this issue to commit to Trunk first. TBR=rdsmith@chromium.org BUG=178201 Review URL: https://chromiumcodereview.appspot.com/12648006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187930 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/cookies/cookie_store_unittest.h')
-rw-r--r--net/cookies/cookie_store_unittest.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/cookies/cookie_store_unittest.h b/net/cookies/cookie_store_unittest.h
index eed8b00..d445a3f 100644
--- a/net/cookies/cookie_store_unittest.h
+++ b/net/cookies/cookie_store_unittest.h
@@ -574,6 +574,29 @@ TYPED_TEST_P(CookieStoreTest, PathTest) {
this->MatchCookieLines("A=C", this->GetCookies(cs, GURL(url + "/")));
}
+TYPED_TEST_P(CookieStoreTest, EmptyExpires) {
+ scoped_refptr<CookieStore> cs(this->GetCookieStore());
+ CookieOptions options;
+ GURL url("http://www7.ipdl.inpit.go.jp/Tokujitu/tjkta.ipdl?N0000=108");
+ std::string set_cookie_line =
+ "ACSTM=20130308043820420042; path=/; domain=ipdl.inpit.go.jp; Expires=";
+ std::string cookie_line = "ACSTM=20130308043820420042";
+
+ this->SetCookieWithOptions( cs, url, set_cookie_line, options);
+ this->MatchCookieLines(cookie_line,
+ this->GetCookiesWithOptions(cs, url, options));
+
+ options.set_server_time(base::Time::Now() - base::TimeDelta::FromHours(1));
+ this->SetCookieWithOptions( cs, url, set_cookie_line, options);
+ this->MatchCookieLines(cookie_line,
+ this->GetCookiesWithOptions(cs, url, options));
+
+ options.set_server_time(base::Time::Now() + base::TimeDelta::FromHours(1));
+ this->SetCookieWithOptions( cs, url, set_cookie_line, options);
+ this->MatchCookieLines(cookie_line,
+ this->GetCookiesWithOptions(cs, url, options));
+}
+
TYPED_TEST_P(CookieStoreTest, HttpOnlyTest) {
if (!TypeParam::supports_http_only)
return;
@@ -862,6 +885,7 @@ REGISTER_TYPED_TEST_CASE_P(CookieStoreTest,
InvalidScheme,
InvalidScheme_Read,
PathTest,
+ EmptyExpires,
HttpOnlyTest,
TestCookieDeletion,
TestDeleteAllCreatedBetween,