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

Unified Diff: net/quic/test_tools/quic_test_utils.cc

Issue 11300020: Add QuicStream and friends to QUIC code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: smaller char constant Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.cc
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index a1c11791530101f0e5256e1fb9b10b10102cbac5..3e3171f6839d323cef2f97890da7589fec9f30d2 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "net/quic/test_tools/quic_test_utils.h"
+
#include "net/quic/crypto/crypto_framer.h"
using std::max;
@@ -34,6 +35,16 @@ void FramerVisitorCapturingAcks::OnAckFrame(const QuicAckFrame& frame) {
frame_ = frame;
}
+MockHelper::MockHelper() {
+}
+
+MockHelper::~MockHelper() {
+}
+
+QuicClock* MockHelper::GetClock() {
+ return &clock_;
+}
+
MockConnectionVisitor::MockConnectionVisitor() {
}
@@ -156,6 +167,36 @@ QuicPacket* ConstructHandshakePacket(QuicGuid guid, CryptoTag tag) {
return packet;
}
+MockConnection::MockConnection(QuicGuid guid, IPEndPoint address)
+ : QuicConnection(guid, address, new MockHelper()) {
+}
+
+MockConnection::~MockConnection() {
+}
+
+PacketSavingConnection::PacketSavingConnection(QuicGuid guid,
+ IPEndPoint address)
+ : MockConnection(guid, address) {
+}
+
+PacketSavingConnection::~PacketSavingConnection() {
+}
+
+bool PacketSavingConnection::SendPacket(QuicPacketSequenceNumber number,
+ QuicPacket* packet,
+ bool resend,
+ bool force) {
+ packets_.push_back(packet);
+ return true;
+}
+
+MockSession::MockSession(QuicConnection* connection, bool is_server)
+ : QuicSession(connection, is_server) {
+}
+
+MockSession::~MockSession() {
+}
+
} // namespace test
} // namespace net
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698