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

Side by Side Diff: net/tools/quic/test_tools/quic_test_utils.h

Issue 15074007: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for windows Created 7 years, 7 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
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 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 private: 68 private:
69 const bool has_mock_helper_; 69 const bool has_mock_helper_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(MockConnection); 71 DISALLOW_COPY_AND_ASSIGN(MockConnection);
72 }; 72 };
73 73
74 class TestDecompressorVisitor : public QuicSpdyDecompressor::Visitor { 74 class TestDecompressorVisitor : public QuicSpdyDecompressor::Visitor {
75 public: 75 public:
76 virtual ~TestDecompressorVisitor() {} 76 virtual ~TestDecompressorVisitor() {}
77 virtual bool OnDecompressedData(base::StringPiece data) OVERRIDE; 77 virtual bool OnDecompressedData(base::StringPiece data) OVERRIDE;
78 virtual void OnDecompressionError() OVERRIDE;
78 79
79 std::string data() { return data_; } 80 std::string data() { return data_; }
81 bool error() { return error_; }
80 82
81 private: 83 private:
82 std::string data_; 84 std::string data_;
85 bool error_;
83 }; 86 };
84 87
85 class TestSession : public QuicSession { 88 class TestSession : public QuicSession {
86 public: 89 public:
87 TestSession(QuicConnection* connection, bool is_server); 90 TestSession(QuicConnection* connection,
91 const QuicConfig& config,
92 bool is_server);
88 virtual ~TestSession(); 93 virtual ~TestSession();
89 94
90 MOCK_METHOD1(CreateIncomingReliableStream, 95 MOCK_METHOD1(CreateIncomingReliableStream,
91 ReliableQuicStream*(QuicStreamId id)); 96 ReliableQuicStream*(QuicStreamId id));
92 MOCK_METHOD0(CreateOutgoingReliableStream, ReliableQuicStream*()); 97 MOCK_METHOD0(CreateOutgoingReliableStream, ReliableQuicStream*());
93 98
94 void SetCryptoStream(QuicCryptoStream* stream); 99 void SetCryptoStream(QuicCryptoStream* stream);
95 100
96 virtual QuicCryptoStream* GetCryptoStream(); 101 virtual QuicCryptoStream* GetCryptoStream();
97 102
98 private: 103 private:
99 QuicCryptoStream* crypto_stream_; 104 QuicCryptoStream* crypto_stream_;
100 DISALLOW_COPY_AND_ASSIGN(TestSession); 105 DISALLOW_COPY_AND_ASSIGN(TestSession);
101 }; 106 };
102 107
103 } // namespace test 108 } // namespace test
104 } // namespace tools 109 } // namespace tools
105 } // namespace net 110 } // namespace net
106 111
107 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 112 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.cc ('k') | net/tools/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698