summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorgavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-22 18:39:35 +0000
committergavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-22 18:39:35 +0000
commit29cc1ce45c9a153677862bde6486b277e283aea9 (patch)
tree2f2ee6d67b0196bb027fa4d1002d1097213cfbef /net
parent14fb4a01ec4c8fc229c7cf42d1c5acd8f4a73b82 (diff)
downloadchromium_src-29cc1ce45c9a153677862bde6486b277e283aea9.zip
chromium_src-29cc1ce45c9a153677862bde6486b277e283aea9.tar.gz
chromium_src-29cc1ce45c9a153677862bde6486b277e283aea9.tar.bz2
Make disk cache tests ETags more HTTP standard conformant.
ETags shuld use quotes. For a special treat, do check out HttpCache.ConditionalizedGet_PreserveRequestHeaders, previously it asserted on the ETags as being "\"foopy\"" when the ETags were created they were just "foppy". So that test looked like a matching ETags unless you read the code very carefully. R=rvargas@chromium.org BUG=None Review URL: https://chromiumcodereview.appspot.com/10802053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/http/http_cache_unittest.cc10
-rw-r--r--net/http/http_transaction_unittest.cc4
2 files changed, 7 insertions, 7 deletions
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 9026599..d692c51 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -3791,7 +3791,7 @@ TEST(HttpCache, DoomOnDestruction3) {
"Last-Modified: Wed, 28 Nov 2007 00:40:09 GMT\n"
"Content-Length: 22\n"
"Accept-Ranges: none\n"
- "Etag: foopy\n";
+ "Etag: \"foopy\"\n";
AddMockTransaction(&transaction);
MockHttpRequest request(transaction);
@@ -3834,7 +3834,7 @@ TEST(HttpCache, SetTruncatedFlag) {
transaction.response_headers =
"Last-Modified: Wed, 28 Nov 2007 00:40:09 GMT\n"
"Content-Length: 22\n"
- "Etag: foopy\n";
+ "Etag: \"foopy\"\n";
AddMockTransaction(&transaction);
MockHttpRequest request(transaction);
@@ -3894,7 +3894,7 @@ TEST(HttpCache, DontSetTruncatedFlag) {
transaction.response_headers =
"Last-Modified: Wed, 28 Nov 2007 00:40:09 GMT\n"
"Content-Length: 22\n"
- "Etag: foopy\n";
+ "Etag: \"foopy\"\n";
AddMockTransaction(&transaction);
MockHttpRequest request(transaction);
@@ -4821,7 +4821,7 @@ TEST(HttpCache, StopCachingSavesEntry) {
AddMockTransaction(&mock_transaction);
mock_transaction.response_headers = "Cache-Control: max-age=10000\n"
"Content-Length: 42\n"
- "Etag: foo\n";
+ "Etag: \"foo\"\n";
rv = trans->Start(&request, callback.callback(), net::BoundNetLog());
EXPECT_EQ(net::OK, callback.GetResult(rv));
@@ -4936,7 +4936,7 @@ TEST(HttpCache, TruncatedByContentLength2) {
AddMockTransaction(&transaction);
transaction.response_headers = "Cache-Control: max-age=10000\n"
"Content-Length: 100\n"
- "Etag: foo\n";
+ "Etag: \"foo\"\n";
RunTransactionTest(cache.http_cache(), transaction);
RemoveMockTransaction(&transaction);
diff --git a/net/http/http_transaction_unittest.cc b/net/http/http_transaction_unittest.cc
index d3854d3..9c09c42 100644
--- a/net/http/http_transaction_unittest.cc
+++ b/net/http/http_transaction_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -80,7 +80,7 @@ const MockTransaction kETagGET_Transaction = {
net::LOAD_NORMAL,
"HTTP/1.1 200 OK",
"Cache-Control: max-age=10000\n"
- "Etag: foopy\n",
+ "Etag: \"foopy\"\n",
base::Time(),
"<html><body>Google Blah Blah</body></html>",
TEST_MODE_NORMAL,