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

Unified Diff: net/quic/quic_http_stream_test.cc

Issue 1142523004: Custom hosts in QuicTestPacketMaker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add QuicTestPacketMaker::set_hostname() method. Created 5 years, 7 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 74979b32b10e95d03a053d9b33205a674e0ca512..3e24ccb9c38b6fee6a3f289e6677666d35579bfc 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -50,8 +50,8 @@ namespace test {
namespace {
const char kUploadData[] = "Really nifty data!";
-const char kServerHostname[] = "www.google.com";
-const uint16 kServerPort = 80;
+const char kDefaultServerHostName[] = "www.google.com";
+const uint16 kDefaultServerPort = 80;
class TestQuicConnection : public QuicConnection {
public:
@@ -135,7 +135,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
read_buffer_(new IOBufferWithSize(4096)),
connection_id_(2),
stream_id_(kClientDataStreamId1),
- maker_(GetParam(), connection_id_, &clock_),
+ maker_(GetParam(), connection_id_, &clock_, kDefaultServerHostName),
random_generator_(0) {
IPAddressNumber ip;
CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip));
@@ -210,11 +210,10 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
&transport_security_state_, make_scoped_ptr((QuicServerInfo*)nullptr),
DefaultQuicConfig(), "CONNECTION_UNKNOWN", base::TimeTicks::Now(),
base::MessageLoop::current()->message_loop_proxy().get(), nullptr));
- session_->InitializeSession(QuicServerId(kServerHostname, kServerPort,
- /*is_secure=*/false,
- PRIVACY_MODE_DISABLED),
- &crypto_config_,
- &crypto_client_stream_factory_);
+ session_->InitializeSession(
+ QuicServerId(kDefaultServerHostName, kDefaultServerPort,
+ /*is_secure=*/false, PRIVACY_MODE_DISABLED),
+ &crypto_config_, &crypto_client_stream_factory_);
session_->GetCryptoStream()->CryptoConnect();
EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
stream_.reset(use_closing_stream_ ?
« no previous file with comments | « no previous file | net/quic/quic_network_transaction_unittest.cc » ('j') | net/quic/quic_network_transaction_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698