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

Unified Diff: net/base/sdch_manager_unittest.cc

Issue 1871383005: Fix parsing of max-age in SdchManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improve comment with rdsmith's suggestion Created 4 years, 8 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/sdch_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager_unittest.cc
diff --git a/net/base/sdch_manager_unittest.cc b/net/base/sdch_manager_unittest.cc
index 6ae186f090fd96612aef090a9f55b7c120af5e80..1436309c19b61320428a6b029682e51a2b74f41b 100644
--- a/net/base/sdch_manager_unittest.cc
+++ b/net/base/sdch_manager_unittest.cc
@@ -556,6 +556,10 @@ TEST_F(SdchManagerTest, GetDictionaryNotification) {
TEST_F(SdchManagerTest, ExpirationCheckedProperly) {
// Create an SDCH dictionary with an expiration time in the past.
std::string dictionary_domain("x.y.z.google.com");
+ // TODO(eroman): "max-age: -1" is invalid -- it is not a valid production of
+ // delta-seconds (1*DIGIT). This test works because currently an invalid
+ // max-age results in the dictionary being considered expired on loading
+ // (crbug.com/602691)
std::string dictionary_text(base::StringPrintf("Domain: %s\nMax-age: -1\n\n",
dictionary_domain.c_str()));
dictionary_text.append(
« no previous file with comments | « net/base/sdch_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698