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

Unified Diff: net/quic/quic_http_stream_test.cc

Issue 192583004: QUIC - use QuicSessionKey tuple (host, port, is_https) instead of server_hostname (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use QuicSessionKey as arg and delete server_hostname as arg Created 6 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
Index: net/quic/quic_http_stream_test.cc
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index 7fef0c5d4847af5c7a243d77c4e74be2242647e9..7a1eadedce86afe3d0190d7a85729974c82ef691 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -48,6 +48,8 @@ namespace test {
namespace {
const char kUploadData[] = "hello world!";
+const char kServerHostname[] = "www.google.com";
+const uint16 kServerPort = 80;
class TestQuicConnection : public QuicConnection {
public:
@@ -124,6 +126,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
QuicHttpStreamTest()
: net_log_(BoundNetLog()),
use_closing_stream_(false),
+ session_key_(kServerHostname, kServerPort, false),
read_buffer_(new IOBufferWithSize(4096)),
connection_id_(2),
stream_id_(5),
@@ -203,9 +206,8 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
new QuicClientSession(connection_,
scoped_ptr<DatagramClientSocket>(socket),
writer_.Pass(), NULL,
- &crypto_client_stream_factory_,
- "www.google.com", DefaultQuicConfig(),
- &crypto_config_, NULL));
+ &crypto_client_stream_factory_, session_key_,
+ DefaultQuicConfig(), &crypto_config_, NULL));
session_->GetCryptoStream()->CryptoConnect();
EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
stream_.reset(use_closing_stream_ ?
@@ -282,6 +284,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
scoped_ptr<QuicHttpStream> stream_;
scoped_ptr<QuicDefaultPacketWriter> writer_;
scoped_ptr<QuicClientSession> session_;
+ QuicSessionKey session_key_;
QuicCryptoClientConfig crypto_config_;
TestCompletionCallback callback_;
HttpRequestInfo request_;

Powered by Google App Engine
This is Rietveld 408576698