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

Side by Side Diff: net/quic/quic_crypto_client_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_client_stream.cc ('k') | net/quic/quic_crypto_server_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_client_stream.h" 5 #include "net/quic/quic_crypto_client_stream.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "net/quic/crypto/quic_decrypter.h" 8 #include "net/quic/crypto/quic_decrypter.h"
9 #include "net/quic/crypto/quic_encrypter.h" 9 #include "net/quic/crypto/quic_encrypter.h"
10 #include "net/quic/test_tools/crypto_test_utils.h" 10 #include "net/quic/test_tools/crypto_test_utils.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 virtual QuicConsumedData WriteData(QuicStreamId id, base::StringPiece data, 54 virtual QuicConsumedData WriteData(QuicStreamId id, base::StringPiece data,
55 QuicStreamOffset offset, bool fin) { 55 QuicStreamOffset offset, bool fin) {
56 return QuicSession::WriteData(id, data, offset, fin); 56 return QuicSession::WriteData(id, data, offset, fin);
57 } 57 }
58 }; 58 };
59 59
60 class QuicCryptoClientStreamTest : public ::testing::Test { 60 class QuicCryptoClientStreamTest : public ::testing::Test {
61 public: 61 public:
62 QuicCryptoClientStreamTest() 62 QuicCryptoClientStreamTest()
63 : addr_(), 63 : addr_(),
64 connection_(new PacketSavingConnection(1, addr_)), 64 connection_(new PacketSavingConnection(1, addr_, true)),
65 session_(connection_, true), 65 session_(connection_, true),
66 stream_(&session_, kServerHostname) { 66 stream_(&session_, kServerHostname) {
67 } 67 }
68 68
69 void CompleteCryptoHandshake() { 69 void CompleteCryptoHandshake() {
70 EXPECT_TRUE(stream_.CryptoConnect()); 70 EXPECT_TRUE(stream_.CryptoConnect());
71 CryptoTestUtils::HandshakeWithFakeServer(connection_, &stream_); 71 CryptoTestUtils::HandshakeWithFakeServer(connection_, &stream_);
72 } 72 }
73 73
74 void ConstructHandshakeMessage() { 74 void ConstructHandshakeMessage() {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 stream_.ProcessData(message_data_->data(), message_data_->length()); 172 stream_.ProcessData(message_data_->data(), message_data_->length());
173 } 173 }
174 174
175 TEST_F(QuicCryptoClientStreamTest, CryptoConnect) { 175 TEST_F(QuicCryptoClientStreamTest, CryptoConnect) {
176 EXPECT_TRUE(stream_.CryptoConnect()); 176 EXPECT_TRUE(stream_.CryptoConnect());
177 } 177 }
178 178
179 } // namespace 179 } // namespace
180 } // namespace test 180 } // namespace test
181 } // namespace net 181 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/quic_crypto_server_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698