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

Unified Diff: net/quic/quic_client_promised_info_test.cc

Issue 1898793003: Make QuicDispatcher's helper and alarm factory arguments unique_ptrs to make ownership clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119871679
Patch Set: fixing rebase Created 4 years, 8 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/quic/quic_client_promised_info.cc ('k') | net/quic/quic_client_push_promise_index_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_promised_info_test.cc
diff --git a/net/quic/quic_client_promised_info_test.cc b/net/quic/quic_client_promised_info_test.cc
index 7ee6436fa8d151c957caa939b66ac1b30b00d57f..acd824692656aac4dff926e8d30d48a42be261f0 100644
--- a/net/quic/quic_client_promised_info_test.cc
+++ b/net/quic/quic_client_promised_info_test.cc
@@ -71,8 +71,9 @@ class QuicClientPromisedInfoTest : public ::testing::Test {
class StreamVisitor;
QuicClientPromisedInfoTest()
- : connection_(
- new StrictMock<MockConnection>(&helper_, Perspective::IS_CLIENT)),
+ : connection_(new StrictMock<MockConnection>(&helper_,
+ &alarm_factory_,
+ Perspective::IS_CLIENT)),
session_(connection_, &push_promise_index_),
body_("hello world"),
promise_id_(gfe_quic::test::kServerDataStreamId1) {
@@ -143,6 +144,7 @@ class QuicClientPromisedInfoTest : public ::testing::Test {
}
MockConnectionHelper helper_;
+ MockAlarmFactory alarm_factory_;
StrictMock<MockConnection>* connection_;
QuicClientPushPromiseIndex push_promise_index_;
@@ -177,7 +179,7 @@ TEST_F(QuicClientPromisedInfoTest, PushPromiseCleanupAlarm) {
// Fire the alarm that will cancel the promised stream.
EXPECT_CALL(*connection_,
SendRstStream(promise_id_, QUIC_STREAM_CANCELLED, 0));
- helper_.FireAlarm(QuicClientPromisedInfoPeer::GetAlarm(promised));
+ alarm_factory_.FireAlarm(QuicClientPromisedInfoPeer::GetAlarm(promised));
// Verify that the promise is gone after the alarm fires.
EXPECT_EQ(session_.GetPromisedById(promise_id_), nullptr);
« no previous file with comments | « net/quic/quic_client_promised_info.cc ('k') | net/quic/quic_client_push_promise_index_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698