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

Unified Diff: net/tools/quic/quic_in_memory_cache_test.cc

Issue 18655004: Add a quic_in_memory_cache_test data file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "Fix unittest error." Created 7 years, 6 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
Index: net/tools/quic/quic_in_memory_cache_test.cc
diff --git a/net/tools/quic/quic_in_memory_cache_test.cc b/net/tools/quic/quic_in_memory_cache_test.cc
index 438f24c4d9e0c543628bd5e17f83ec42f0e3280e..9686238b8db37a9a555edafe1f1f9ece9f5c9f68 100644
--- a/net/tools/quic/quic_in_memory_cache_test.cc
+++ b/net/tools/quic/quic_in_memory_cache_test.cc
@@ -13,7 +13,6 @@
namespace net {
namespace tools {
namespace test {
-namespace {
class QuicInMemoryCacheTest : public ::testing::Test {
protected:
@@ -32,6 +31,11 @@ class QuicInMemoryCacheTest : public ::testing::Test {
headers->SetRequestFirstlineFromStringPieces("GET", path, "HTTP/1.1");
headers->ReplaceOrAppendHeader("host", host);
}
+
+ void SetUp() {
+ QuicInMemoryCache::GetInstance()->ResetForTests();
+ QuicInMemoryCache::GetInstance()->Initialize();
+ }
};
TEST_F(QuicInMemoryCacheTest, ReadsCacheDir) {
@@ -50,7 +54,7 @@ TEST_F(QuicInMemoryCacheTest, ReadsCacheDir) {
TEST_F(QuicInMemoryCacheTest, ReadsCacheDirHttp) {
net::BalsaHeaders request_headers;
- CreateRequest("http://quic.test.url", "/index.html", &request_headers);
+ CreateRequest("", "http://quic.test.url/index.html", &request_headers);
const QuicInMemoryCache::Response* response =
QuicInMemoryCache::GetInstance()->GetResponse(request_headers);
@@ -71,7 +75,6 @@ TEST_F(QuicInMemoryCacheTest, GetResponseNoMatch) {
ASSERT_FALSE(response);
}
Ryan Hamilton 2013/07/04 14:46:03 Can you add a test which pass with the new code, b
honghaiz 2013/07/04 17:34:04 Done.
-} // namespace
} // namespace test
} // namespace tools
} // namespace net
« net/tools/quic/quic_in_memory_cache.cc ('K') | « net/tools/quic/quic_in_memory_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698