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

Unified Diff: net/quic/quic_client_session_test.cc

Issue 11633030: Send the ClientHello handshake message. Fix a bug in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove an extraneous test:: before TestCryptoVisitor Created 7 years, 11 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
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_crypto_client_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_session_test.cc
===================================================================
--- net/quic/quic_client_session_test.cc (revision 177030)
+++ net/quic/quic_client_session_test.cc (working copy)
@@ -25,7 +25,6 @@
session_(connection_, NULL, NULL) {
}
- protected:
QuicGuid guid_;
PacketSavingConnection* connection_;
QuicClientSession session_;
@@ -36,7 +35,8 @@
TEST_F(QuicClientSessionTest, CryptoConnectSendsCorrectData) {
EXPECT_EQ(ERR_IO_PENDING, session_.CryptoConnect(callback_.callback()));
ASSERT_EQ(1u, connection_->packets_.size());
- scoped_ptr<QuicPacket> chlo(ConstructHandshakePacket(guid_, kCHLO));
+ scoped_ptr<QuicPacket> chlo(ConstructClientHelloPacket(
+ guid_, connection_->clock(), connection_->random_generator()));
CompareQuicDataWithHexError("CHLO", connection_->packets_[0], chlo.get());
}
@@ -52,6 +52,7 @@
TEST_F(QuicClientSessionTest, MaxNumConnections) {
// Initialize crypto before the client session will create a stream.
ASSERT_EQ(ERR_IO_PENDING, session_.CryptoConnect(callback_.callback()));
+ // Simulate the server crypto handshake.
CryptoHandshakeMessage server_message;
server_message.tag = kSHLO;
session_.GetCryptoStream()->OnHandshakeMessage(server_message);
« no previous file with comments | « net/quic/quic_client_session.cc ('k') | net/quic/quic_crypto_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698