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

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

Issue 1544563002: Adds a DCHECK that the host argument to QuicInMemoryCache::AddResponse is not empty. An empty host … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110267778
Patch Set: Created 5 years 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_in_memory_cache.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_server_stream_test.cc
diff --git a/net/tools/quic/quic_simple_server_stream_test.cc b/net/tools/quic/quic_simple_server_stream_test.cc
index fce9ec135d7dc3445364a0c7c342f1625de56ad4..d1375ec2800d0b980ae91a8ab156bfdda4ac3dfb 100644
--- a/net/tools/quic/quic_simple_server_stream_test.cc
+++ b/net/tools/quic/quic_simple_server_stream_test.cc
@@ -87,7 +87,7 @@ class QuicSimpleServerStreamTest
body_("hello world") {
SpdyHeaderBlock request_headers;
request_headers[":host"] = "";
- request_headers[":authority"] = "";
+ request_headers[":authority"] = "www.google.com";
request_headers[":path"] = "/";
request_headers[":method"] = "POST";
request_headers[":version"] = "HTTP/1.1";
@@ -209,7 +209,7 @@ TEST_P(QuicSimpleServerStreamTest, SendResponseWithIllegalResponseStatus) {
// Send a illegal response with response status not supported by HTTP/2.
SpdyHeaderBlock* request_headers = stream_->mutable_headers();
(*request_headers)[":path"] = "/bar";
- (*request_headers)[":authority"] = "";
+ (*request_headers)[":authority"] = "www.google.com";
(*request_headers)[":version"] = "HTTP/1.1";
(*request_headers)[":method"] = "GET";
@@ -218,8 +218,8 @@ TEST_P(QuicSimpleServerStreamTest, SendResponseWithIllegalResponseStatus) {
response_headers_[":status"] = "200 OK";
response_headers_["content-length"] = "5";
string body = "Yummm";
- QuicInMemoryCache::GetInstance()->AddResponse("", "/bar", response_headers_,
- body);
+ QuicInMemoryCache::GetInstance()->AddResponse("www.google.com", "/bar",
+ response_headers_, body);
stream_->set_fin_received(true);
@@ -246,7 +246,7 @@ TEST_P(QuicSimpleServerStreamTest, SendPushResponseWith404Response) {
// invalid server push response.
SpdyHeaderBlock* request_headers = promised_stream->mutable_headers();
(*request_headers)[":path"] = "/bar";
- (*request_headers)[":authority"] = "";
+ (*request_headers)[":authority"] = "www.google.com";
(*request_headers)[":version"] = "HTTP/1.1";
(*request_headers)[":method"] = "GET";
@@ -254,8 +254,8 @@ TEST_P(QuicSimpleServerStreamTest, SendPushResponseWith404Response) {
response_headers_[":status"] = "404";
response_headers_["content-length"] = "8";
string body = "NotFound";
- QuicInMemoryCache::GetInstance()->AddResponse("", "/bar", response_headers_,
- body);
+ QuicInMemoryCache::GetInstance()->AddResponse("www.google.com", "/bar",
+ response_headers_, body);
InSequence s;
EXPECT_CALL(session_,
@@ -268,7 +268,7 @@ TEST_P(QuicSimpleServerStreamTest, SendResponseWithValidHeaders) {
// Add a request and response with valid headers.
SpdyHeaderBlock* request_headers = stream_->mutable_headers();
(*request_headers)[":path"] = "/bar";
- (*request_headers)[":authority"] = "";
+ (*request_headers)[":authority"] = "www.google.com";
(*request_headers)[":version"] = "HTTP/1.1";
(*request_headers)[":method"] = "GET";
@@ -276,8 +276,8 @@ TEST_P(QuicSimpleServerStreamTest, SendResponseWithValidHeaders) {
response_headers_[":status"] = "200";
response_headers_["content-length"] = "5";
string body = "Yummm";
- QuicInMemoryCache::GetInstance()->AddResponse("", "/bar", response_headers_,
- body);
+ QuicInMemoryCache::GetInstance()->AddResponse("www.google.com", "/bar",
+ response_headers_, body);
stream_->set_fin_received(true);
InSequence s;
« no previous file with comments | « net/tools/quic/quic_in_memory_cache.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698