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

Side by Side Diff: net/quic/quic_crypto_server_stream_test.cc

Issue 12806002: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor comment fix Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_crypto_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_crypto_server_stream.h" 5 #include "net/quic/quic_crypto_server_stream.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ReliableQuicStream*(QuicStreamId id)); 60 ReliableQuicStream*(QuicStreamId id));
61 MOCK_METHOD0(GetCryptoStream, QuicCryptoStream*()); 61 MOCK_METHOD0(GetCryptoStream, QuicCryptoStream*());
62 MOCK_METHOD0(CreateOutgoingReliableStream, ReliableQuicStream*()); 62 MOCK_METHOD0(CreateOutgoingReliableStream, ReliableQuicStream*());
63 }; 63 };
64 64
65 class QuicCryptoServerStreamTest : public ::testing::Test { 65 class QuicCryptoServerStreamTest : public ::testing::Test {
66 public: 66 public:
67 QuicCryptoServerStreamTest() 67 QuicCryptoServerStreamTest()
68 : guid_(1), 68 : guid_(1),
69 addr_(), 69 addr_(),
70 connection_(new PacketSavingConnection(guid_, addr_)), 70 connection_(new PacketSavingConnection(guid_, addr_, true)),
71 session_(connection_, true), 71 session_(connection_, true),
72 stream_(&session_) { 72 stream_(&session_) {
73 } 73 }
74 74
75 void ConstructHandshakeMessage() { 75 void ConstructHandshakeMessage() {
76 CryptoFramer framer; 76 CryptoFramer framer;
77 message_data_.reset(framer.ConstructHandshakeMessage(message_)); 77 message_data_.reset(framer.ConstructHandshakeMessage(message_));
78 } 78 }
79 79
80 void CompleteCryptoHandshake() { 80 void CompleteCryptoHandshake() {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 message_.tag = kSHLO; 113 message_.tag = kSHLO;
114 ConstructHandshakeMessage(); 114 ConstructHandshakeMessage();
115 EXPECT_CALL(*connection_, SendConnectionClose( 115 EXPECT_CALL(*connection_, SendConnectionClose(
116 QUIC_INVALID_CRYPTO_MESSAGE_TYPE)); 116 QUIC_INVALID_CRYPTO_MESSAGE_TYPE));
117 stream_.ProcessData(message_data_->data(), message_data_->length()); 117 stream_.ProcessData(message_data_->data(), message_data_->length());
118 } 118 }
119 119
120 } // namespace 120 } // namespace
121 } // namespace test 121 } // namespace test
122 } // namespace net 122 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_crypto_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698