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

Unified Diff: net/tools/quic/test_tools/quic_test_client.cc

Issue 2242143004: chromium relnote: Making QuicTestClient reads mockable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@130113504
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/test_tools/quic_test_client.cc
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index a4012232abf5f63cb42975d7338b594430d5153e..29c173b23b3863650fae59d794029079f82e205b 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -38,6 +38,8 @@ using net::test::QuicSpdySessionPeer;
using net::test::ReliableQuicStreamPeer;
using std::string;
using std::vector;
+using testing::_;
+using testing::Invoke;
namespace net {
namespace test {
@@ -177,7 +179,16 @@ MockableQuicClient::MockableQuicClient(
base::WrapUnique(
new RecordingProofVerifier(std::move(proof_verifier)))),
override_connection_id_(0),
- test_writer_(nullptr) {}
+ test_writer_(nullptr) {
+ ON_CALL(*this, ProcessPacket(_, _, _))
+ .WillByDefault(Invoke(this, &MockableQuicClient::ProcessPacketBase));
+}
+
+void MockableQuicClient::ProcessPacketBase(const IPEndPoint& self_address,
+ const IPEndPoint& peer_address,
+ const QuicReceivedPacket& packet) {
+ QuicClient::ProcessPacket(self_address, peer_address, packet);
+}
MockableQuicClient::~MockableQuicClient() {
if (connected()) {
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698