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_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 20 matching lines...) Expand all Loading... |
31 namespace net { | 31 namespace net { |
32 namespace test { | 32 namespace test { |
33 namespace { | 33 namespace { |
34 | 34 |
35 // TODO(agl): Use rch's utility class for parsing a message when committed. | 35 // TODO(agl): Use rch's utility class for parsing a message when committed. |
36 class TestQuicVisitor : public NoOpFramerVisitor { | 36 class TestQuicVisitor : public NoOpFramerVisitor { |
37 public: | 37 public: |
38 TestQuicVisitor() {} | 38 TestQuicVisitor() {} |
39 | 39 |
40 // NoOpFramerVisitor | 40 // NoOpFramerVisitor |
41 virtual void OnStreamFrame(const QuicStreamFrame& frame) { | 41 virtual void OnStreamFrame(const QuicStreamFrame& frame) OVERRIDE { |
42 frame_ = frame; | 42 frame_ = frame; |
43 } | 43 } |
44 | 44 |
45 QuicStreamFrame* frame() { return &frame_; } | 45 QuicStreamFrame* frame() { return &frame_; } |
46 | 46 |
47 private: | 47 private: |
48 QuicStreamFrame frame_; | 48 QuicStreamFrame frame_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(TestQuicVisitor); | 50 DISALLOW_COPY_AND_ASSIGN(TestQuicVisitor); |
51 }; | 51 }; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |