OLD | NEW |
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_stream.h" | 5 #include "net/quic/quic_crypto_stream.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 ConstructHandshakeMessage(); | 55 ConstructHandshakeMessage(); |
56 } | 56 } |
57 | 57 |
58 void ConstructHandshakeMessage() { | 58 void ConstructHandshakeMessage() { |
59 CryptoFramer framer; | 59 CryptoFramer framer; |
60 message_data_.reset(framer.ConstructHandshakeMessage(message_)); | 60 message_data_.reset(framer.ConstructHandshakeMessage(message_)); |
61 } | 61 } |
62 | 62 |
63 protected: | 63 protected: |
64 MockConnection* connection_; | 64 MockConnection* connection_; |
65 MockSession session_; | 65 MockQuicSpdySession session_; |
66 MockQuicCryptoStream stream_; | 66 MockQuicCryptoStream stream_; |
67 CryptoHandshakeMessage message_; | 67 CryptoHandshakeMessage message_; |
68 scoped_ptr<QuicData> message_data_; | 68 scoped_ptr<QuicData> message_data_; |
69 | 69 |
70 private: | 70 private: |
71 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStreamTest); | 71 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStreamTest); |
72 }; | 72 }; |
73 | 73 |
74 TEST_F(QuicCryptoStreamTest, NotInitiallyConected) { | 74 TEST_F(QuicCryptoStreamTest, NotInitiallyConected) { |
75 EXPECT_FALSE(stream_.encryption_established()); | 75 EXPECT_FALSE(stream_.encryption_established()); |
(...skipping 26 matching lines...) Expand all Loading... |
102 } | 102 } |
103 | 103 |
104 TEST_F(QuicCryptoStreamTest, NoConnectionLevelFlowControl) { | 104 TEST_F(QuicCryptoStreamTest, NoConnectionLevelFlowControl) { |
105 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 105 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( |
106 &stream_)); | 106 &stream_)); |
107 } | 107 } |
108 | 108 |
109 } // namespace | 109 } // namespace |
110 } // namespace test | 110 } // namespace test |
111 } // namespace net | 111 } // namespace net |
OLD | NEW |