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

Unified Diff: net/quic/quic_client_promised_info_test.cc

Issue 1905843003: Split out QuicAlarm creation from QuicConnectionHelper to new QuicAlarmFactory. No behavior change,… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119753783
Patch Set: 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 c6650f41c89c8a5f0cb7b095a29f049cbabfda74..f05f8f2ea13e9e686ac3df9f4f5d11c3ac6e8638 100644
--- a/net/quic/quic_client_promised_info_test.cc
+++ b/net/quic/quic_client_promised_info_test.cc
@@ -72,8 +72,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) {
@@ -144,6 +145,7 @@ class QuicClientPromisedInfoTest : public ::testing::Test {
}
MockConnectionHelper helper_;
+ MockAlarmFactory alarm_factory_;
StrictMock<MockConnection>* connection_;
QuicClientPushPromiseIndex push_promise_index_;
@@ -178,7 +180,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