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

Unified Diff: net/quic/quic_crypto_server_stream_test.cc

Issue 114933003: Minor cleanup of QUIC MockConnection and PacketSavingConnection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/quic/quic_crypto_client_stream_test.cc ('k') | net/quic/quic_crypto_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_crypto_server_stream_test.cc
diff --git a/net/quic/quic_crypto_server_stream_test.cc b/net/quic/quic_crypto_server_stream_test.cc
index cc50dceed1236f8860681243c861ed2f54266fba..afcd5b38607f470a47b0944fb6187a8c3a2543dd 100644
--- a/net/quic/quic_crypto_server_stream_test.cc
+++ b/net/quic/quic_crypto_server_stream_test.cc
@@ -52,10 +52,7 @@ namespace {
class QuicCryptoServerStreamTest : public testing::TestWithParam<bool> {
public:
QuicCryptoServerStreamTest()
- : guid_(1),
- addr_(ParseIPLiteralToNumber("192.0.2.33", &ip_) ?
- ip_ : IPAddressNumber(), 1),
- connection_(new PacketSavingConnection(guid_, addr_, true)),
+ : connection_(new PacketSavingConnection(true)),
session_(connection_, DefaultQuicConfig(), true),
crypto_config_(QuicCryptoServerConfig::TESTING,
QuicRandom::GetInstance()),
@@ -104,9 +101,6 @@ class QuicCryptoServerStreamTest : public testing::TestWithParam<bool> {
}
protected:
- IPAddressNumber ip_;
- QuicGuid guid_;
- IPEndPoint addr_;
PacketSavingConnection* connection_;
TestSession session_;
QuicConfig config_;
@@ -136,14 +130,8 @@ TEST_P(QuicCryptoServerStreamTest, ConnectedAfterCHLO) {
}
TEST_P(QuicCryptoServerStreamTest, ZeroRTT) {
- QuicGuid guid(1);
- IPAddressNumber ip;
- ParseIPLiteralToNumber("127.0.0.1", &ip);
- IPEndPoint addr(ip, 0);
- PacketSavingConnection* client_conn =
- new PacketSavingConnection(guid, addr, false);
- PacketSavingConnection* server_conn =
- new PacketSavingConnection(guid, addr, false);
+ PacketSavingConnection* client_conn = new PacketSavingConnection(false);
+ PacketSavingConnection* server_conn = new PacketSavingConnection(false);
client_conn->AdvanceTime(QuicTime::Delta::FromSeconds(100000));
server_conn->AdvanceTime(QuicTime::Delta::FromSeconds(100000));
@@ -176,8 +164,8 @@ TEST_P(QuicCryptoServerStreamTest, ZeroRTT) {
// Now do another handshake, hopefully in 0-RTT.
LOG(INFO) << "Resetting for 0-RTT handshake attempt";
- client_conn = new PacketSavingConnection(guid, addr, false);
- server_conn = new PacketSavingConnection(guid, addr, false);
+ client_conn = new PacketSavingConnection(false);
+ server_conn = new PacketSavingConnection(false);
// We need to advance time past the strike-server window so that it's
// authoritative in this time span.
client_conn->AdvanceTime(QuicTime::Delta::FromSeconds(102000));
« no previous file with comments | « net/quic/quic_crypto_client_stream_test.cc ('k') | net/quic/quic_crypto_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698