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); |