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

Unified Diff: net/quic/quic_session_test.cc

Issue 14083012: QUIC: retransmit packets with the correct encryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved HandshakeMode enum to MockCryptoClientStream Created 7 years, 8 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_session_test.cc
diff --git a/net/quic/quic_session_test.cc b/net/quic/quic_session_test.cc
index bd18ec8a4155e222344cb4e8772190462f4bb0f6..f9936258d696d4b4e02b2eee7c3b14e4986750bc 100644
--- a/net/quic/quic_session_test.cc
+++ b/net/quic/quic_session_test.cc
@@ -30,7 +30,9 @@ class TestCryptoStream : public QuicCryptoStream {
virtual void OnHandshakeMessage(
const CryptoHandshakeMessage& message) OVERRIDE {
- SetHandshakeComplete(QUIC_NO_ERROR);
+ encryption_established_ = true;
+ handshake_confirmed_ = true;
+ session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED);
}
};
@@ -115,11 +117,11 @@ class QuicSessionTest : public ::testing::Test {
set<QuicStreamId> closed_streams_;
};
-TEST_F(QuicSessionTest, IsCryptoHandshakeComplete) {
- EXPECT_FALSE(session_.IsCryptoHandshakeComplete());
+TEST_F(QuicSessionTest, IsCryptoHandshakeConfirmed) {
+ EXPECT_FALSE(session_.IsCryptoHandshakeConfirmed());
CryptoHandshakeMessage message;
session_.crypto_stream_.OnHandshakeMessage(message);
- EXPECT_TRUE(session_.IsCryptoHandshakeComplete());
+ EXPECT_TRUE(session_.IsCryptoHandshakeConfirmed());
}
TEST_F(QuicSessionTest, IsClosedStreamDefault) {

Powered by Google App Engine
This is Rietveld 408576698