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/core/quic_crypto_stream.h" | 5 #include "net/quic/core/quic_crypto_stream.h" |
6 | 6 |
7 #include <cstdint> | 7 #include <cstdint> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 class MockQuicCryptoStream : public QuicCryptoStream { | 28 class MockQuicCryptoStream : public QuicCryptoStream { |
29 public: | 29 public: |
30 explicit MockQuicCryptoStream(QuicSession* session) | 30 explicit MockQuicCryptoStream(QuicSession* session) |
31 : QuicCryptoStream(session) {} | 31 : QuicCryptoStream(session) {} |
32 | 32 |
33 void OnHandshakeMessage(const CryptoHandshakeMessage& message) override { | 33 void OnHandshakeMessage(const CryptoHandshakeMessage& message) override { |
34 messages_.push_back(message); | 34 messages_.push_back(message); |
35 } | 35 } |
36 | 36 |
37 vector<CryptoHandshakeMessage>* messages() { return &messages_; } | 37 std::vector<CryptoHandshakeMessage>* messages() { return &messages_; } |
38 | 38 |
39 private: | 39 private: |
40 vector<CryptoHandshakeMessage> messages_; | 40 std::vector<CryptoHandshakeMessage> messages_; |
41 | 41 |
42 DISALLOW_COPY_AND_ASSIGN(MockQuicCryptoStream); | 42 DISALLOW_COPY_AND_ASSIGN(MockQuicCryptoStream); |
43 }; | 43 }; |
44 | 44 |
45 class QuicCryptoStreamTest : public ::testing::Test { | 45 class QuicCryptoStreamTest : public ::testing::Test { |
46 public: | 46 public: |
47 QuicCryptoStreamTest() | 47 QuicCryptoStreamTest() |
48 : connection_(new MockQuicConnection(&helper_, | 48 : connection_(new MockQuicConnection(&helper_, |
49 &alarm_factory_, | 49 &alarm_factory_, |
50 Perspective::IS_CLIENT)), | 50 Perspective::IS_CLIENT)), |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 106 } |
107 | 107 |
108 TEST_F(QuicCryptoStreamTest, NoConnectionLevelFlowControl) { | 108 TEST_F(QuicCryptoStreamTest, NoConnectionLevelFlowControl) { |
109 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( | 109 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( |
110 &stream_)); | 110 &stream_)); |
111 } | 111 } |
112 | 112 |
113 } // namespace | 113 } // namespace |
114 } // namespace test | 114 } // namespace test |
115 } // namespace net | 115 } // namespace net |
OLD | NEW |