Index: net/tools/quic/quic_spdy_server_stream_test.cc |
diff --git a/net/tools/quic/quic_spdy_server_stream_test.cc b/net/tools/quic/quic_spdy_server_stream_test.cc |
index 0691f113360cebf24d6e529364c24e746907718a..5e57820a13018d4b199f44e29827889d361f4dc5 100644 |
--- a/net/tools/quic/quic_spdy_server_stream_test.cc |
+++ b/net/tools/quic/quic_spdy_server_stream_test.cc |
@@ -98,31 +98,13 @@ class QuicSpdyServerStreamTest : public ::testing::TestWithParam<QuicVersion> { |
} |
void SetUp() override { |
- QuicInMemoryCache* cache = QuicInMemoryCache::GetInstance(); |
- |
- BalsaHeaders response_headers; |
- StringPiece body("Yum"); |
- response_headers.SetRequestFirstlineFromStringPieces("HTTP/1.1", |
- "200", |
- "OK"); |
- response_headers.AppendHeader("content-length", |
- base::IntToString(body.length())); |
- |
+ QuicInMemoryCachePeer::ResetForTests(); |
string host = ""; |
string path = "/foo"; |
- // Check if response already exists and matches. |
- const QuicInMemoryCache::Response* cached_response = |
- cache->GetResponse(host, path); |
- if (cached_response != nullptr) { |
- string cached_response_headers_str, response_headers_str; |
- cached_response->headers().DumpToString(&cached_response_headers_str); |
- response_headers.DumpToString(&response_headers_str); |
- CHECK_EQ(cached_response_headers_str, response_headers_str); |
- CHECK_EQ(cached_response->body(), body); |
- return; |
- } |
- |
- cache->AddResponse(host, path, response_headers, body); |
+ SpdyHeaderBlock response_headers; |
+ StringPiece body("Yum"); |
+ QuicInMemoryCache::GetInstance()->AddResponse(host, path, response_headers, |
+ body); |
} |
const string& StreamBody() { |