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

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

Issue 1028923002: Make some changes to the QuicInMemory server to clarify the interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 5 years, 9 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/tools/quic/quic_spdy_server_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9277a829a943780dfd5f15e11149806bb3a47c70..0691f113360cebf24d6e529364c24e746907718a 100644
--- a/net/tools/quic/quic_spdy_server_stream_test.cc
+++ b/net/tools/quic/quic_spdy_server_stream_test.cc
@@ -100,21 +100,19 @@ class QuicSpdyServerStreamTest : public ::testing::TestWithParam<QuicVersion> {
void SetUp() override {
QuicInMemoryCache* cache = QuicInMemoryCache::GetInstance();
- BalsaHeaders request_headers, response_headers;
+ BalsaHeaders response_headers;
StringPiece body("Yum");
- request_headers.SetRequestFirstlineFromStringPieces(
- "GET",
- "https://www.google.com/foo",
- "HTTP/1.1");
response_headers.SetRequestFirstlineFromStringPieces("HTTP/1.1",
"200",
"OK");
response_headers.AppendHeader("content-length",
base::IntToString(body.length()));
+ string host = "";
+ string path = "/foo";
// Check if response already exists and matches.
const QuicInMemoryCache::Response* cached_response =
- cache->GetResponse(request_headers);
+ cache->GetResponse(host, path);
if (cached_response != nullptr) {
string cached_response_headers_str, response_headers_str;
cached_response->headers().DumpToString(&cached_response_headers_str);
@@ -124,7 +122,7 @@ class QuicSpdyServerStreamTest : public ::testing::TestWithParam<QuicVersion> {
return;
}
- cache->AddResponse(request_headers, response_headers, body);
+ cache->AddResponse(host, path, response_headers, body);
}
const string& StreamBody() {
« no previous file with comments | « net/tools/quic/quic_spdy_server_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698