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

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

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 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_simple_server_session.cc ('k') | net/tools/quic/quic_simple_server_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_server_session_test.cc
diff --git a/net/tools/quic/quic_simple_server_session_test.cc b/net/tools/quic/quic_simple_server_session_test.cc
index 13409e47e8f0a5240da188b36d8f69c3a5a1911c..f0db44e2f1f8e65da7b000f3b946feee77ced2b9 100644
--- a/net/tools/quic/quic_simple_server_session_test.cc
+++ b/net/tools/quic/quic_simple_server_session_test.cc
@@ -196,7 +196,7 @@ class QuicSimpleServerSessionTest
SupportedVersions(GetParam()));
session_.reset(new QuicSimpleServerSession(
config_, connection_, &owner_, &stream_helper_, &crypto_config_,
- &compressed_certs_cache_, &in_memory_cache_));
+ &compressed_certs_cache_, &response_cache_));
MockClock clock;
handshake_message_.reset(crypto_config_.AddDefaultConfig(
QuicRandom::GetInstance(), &clock,
@@ -217,7 +217,7 @@ class QuicSimpleServerSessionTest
QuicConfig config_;
QuicCryptoServerConfig crypto_config_;
QuicCompressedCertsCache compressed_certs_cache_;
- QuicInMemoryCache in_memory_cache_;
+ QuicHttpResponseCache response_cache_;
std::unique_ptr<QuicSimpleServerSession> session_;
std::unique_ptr<CryptoHandshakeMessage> handshake_message_;
QuicConnectionVisitorInterface* visitor_;
@@ -436,7 +436,7 @@ class QuicSimpleServerSessionServerPushTest
SupportedVersions(GetParam()));
session_.reset(new QuicSimpleServerSession(
config_, connection_, &owner_, &stream_helper_, &crypto_config_,
- &compressed_certs_cache_, &in_memory_cache_));
+ &compressed_certs_cache_, &response_cache_));
session_->Initialize();
// Needed to make new session flow control window and server push work.
session_->OnConfigNegotiated();
@@ -469,17 +469,16 @@ class QuicSimpleServerSessionServerPushTest
SpdyHeaderBlock request_headers;
string resource_host = "www.google.com";
string partial_push_resource_path = "/server_push_src";
- std::list<QuicInMemoryCache::ServerPushInfo> push_resources;
+ std::list<QuicHttpResponseCache::ServerPushInfo> push_resources;
string scheme = "http";
for (unsigned int i = 1; i <= num_resources; ++i) {
QuicStreamId stream_id = i * 2;
string path = partial_push_resource_path + base::UintToString(i);
string url = scheme + "://" + resource_host + path;
GURL resource_url = GURL(url);
- string body;
- GenerateBody(&body, body_size);
- in_memory_cache_.AddSimpleResponse(resource_host, path, 200, body);
- push_resources.push_back(QuicInMemoryCache::ServerPushInfo(
+ string body(body_size, 'a');
+ response_cache_.AddSimpleResponse(resource_host, path, 200, body);
+ push_resources.push_back(QuicHttpResponseCache::ServerPushInfo(
resource_url, SpdyHeaderBlock(), kDefaultPriority, body));
// PUSH_PROMISED are sent for all the resources.
EXPECT_CALL(*headers_stream_,
« no previous file with comments | « net/tools/quic/quic_simple_server_session.cc ('k') | net/tools/quic/quic_simple_server_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698