Internal QUICHE change
PiperOrigin-RevId: 326495370
Change-Id: Iaf890346c89f4f25378669a6f72eb88a79c47f25
diff --git a/quic/core/http/quic_headers_stream_test.cc b/quic/core/http/quic_headers_stream_test.cc
index d2736ff..c7b4c39 100644
--- a/quic/core/http/quic_headers_stream_test.cc
+++ b/quic/core/http/quic_headers_stream_test.cc
@@ -61,6 +61,7 @@
using spdy::SpdyWindowUpdateIR;
using spdy::test::TestHeadersHandler;
using testing::_;
+using testing::AnyNumber;
using testing::AtLeast;
using testing::InSequence;
using testing::Invoke;
@@ -223,6 +224,7 @@
""),
next_promised_stream_id_(2) {
QuicSpdySessionPeer::SetMaxInboundHeaderListSize(&session_, 256 * 1024);
+ EXPECT_CALL(session_, OnCongestionWindowChange(_)).Times(AnyNumber());
session_.Initialize();
headers_stream_ = QuicSpdySessionPeer::GetHeadersStream(&session_);
headers_[":status"] = "200 Ok";
diff --git a/quic/core/http/quic_receive_control_stream_test.cc b/quic/core/http/quic_receive_control_stream_test.cc
index 6e677d7..32cd298 100644
--- a/quic/core/http/quic_receive_control_stream_test.cc
+++ b/quic/core/http/quic_receive_control_stream_test.cc
@@ -24,6 +24,7 @@
namespace {
using ::testing::_;
+using ::testing::AnyNumber;
using ::testing::StrictMock;
struct TestParams {
@@ -86,6 +87,7 @@
perspective(),
SupportedVersions(GetParam().version))),
session_(connection_) {
+ EXPECT_CALL(session_, OnCongestionWindowChange(_)).Times(AnyNumber());
session_.Initialize();
QuicStreamId id = perspective() == Perspective::IS_SERVER
? GetNthClientInitiatedUnidirectionalStreamId(
diff --git a/quic/core/http/quic_send_control_stream_test.cc b/quic/core/http/quic_send_control_stream_test.cc
index fb53b84..284708d 100644
--- a/quic/core/http/quic_send_control_stream_test.cc
+++ b/quic/core/http/quic_send_control_stream_test.cc
@@ -79,6 +79,7 @@
}
void Initialize() {
+ EXPECT_CALL(session_, OnCongestionWindowChange(_)).Times(AnyNumber());
session_.Initialize();
send_control_stream_ = QuicSpdySessionPeer::GetSendControlStream(&session_);
QuicConfigPeer::SetReceivedInitialSessionFlowControlWindow(
diff --git a/quic/core/http/quic_spdy_stream_test.cc b/quic/core/http/quic_spdy_stream_test.cc
index 7746ff2..c9ed83c 100644
--- a/quic/core/http/quic_spdy_stream_test.cc
+++ b/quic/core/http/quic_spdy_stream_test.cc
@@ -338,6 +338,7 @@
connection_ = new StrictMock<MockQuicConnection>(
&helper_, &alarm_factory_, perspective, SupportedVersions(GetParam()));
session_ = std::make_unique<StrictMock<TestSession>>(connection_);
+ EXPECT_CALL(*session_, OnCongestionWindowChange(_)).Times(AnyNumber());
session_->Initialize();
if (connection_->version().SupportsAntiAmplificationLimit()) {
QuicConnectionPeer::SetAddressValidated(connection_);
diff --git a/quic/core/qpack/qpack_receive_stream_test.cc b/quic/core/qpack/qpack_receive_stream_test.cc
index bc47d9d..8a8064e 100644
--- a/quic/core/qpack/qpack_receive_stream_test.cc
+++ b/quic/core/qpack/qpack_receive_stream_test.cc
@@ -15,6 +15,7 @@
namespace {
using ::testing::_;
+using ::testing::AnyNumber;
using ::testing::StrictMock;
struct TestParams {
@@ -55,6 +56,7 @@
perspective(),
SupportedVersions(GetParam().version))),
session_(connection_) {
+ EXPECT_CALL(session_, OnCongestionWindowChange(_)).Times(AnyNumber());
session_.Initialize();
QuicStreamId id = perspective() == Perspective::IS_SERVER
? GetNthClientInitiatedUnidirectionalStreamId(
diff --git a/quic/core/qpack/qpack_send_stream_test.cc b/quic/core/qpack/qpack_send_stream_test.cc
index 63e0f12..2ac3289 100644
--- a/quic/core/qpack/qpack_send_stream_test.cc
+++ b/quic/core/qpack/qpack_send_stream_test.cc
@@ -18,6 +18,7 @@
namespace {
using ::testing::_;
+using ::testing::AnyNumber;
using ::testing::Invoke;
using ::testing::StrictMock;
@@ -66,6 +67,7 @@
perspective(),
SupportedVersions(GetParam().version))),
session_(connection_) {
+ EXPECT_CALL(session_, OnCongestionWindowChange(_)).Times(AnyNumber());
session_.Initialize();
if (connection_->version().SupportsAntiAmplificationLimit()) {
QuicConnectionPeer::SetAddressValidated(connection_);
diff --git a/quic/test_tools/quic_test_utils.cc b/quic/test_tools/quic_test_utils.cc
index 6a09bb7..7ee037a 100644
--- a/quic/test_tools/quic_test_utils.cc
+++ b/quic/test_tools/quic_test_utils.cc
@@ -684,6 +684,8 @@
ON_CALL(*this, SendBlocked(_)).WillByDefault([this](QuicStreamId id) {
return QuicSpdySession::SendBlocked(id);
});
+
+ ON_CALL(*this, OnCongestionWindowChange(_)).WillByDefault(testing::Return());
}
MockQuicSpdySession::~MockQuicSpdySession() {
diff --git a/quic/test_tools/quic_test_utils.h b/quic/test_tools/quic_test_utils.h
index 7fe983f..aac4a2c 100644
--- a/quic/test_tools/quic_test_utils.h
+++ b/quic/test_tools/quic_test_utils.h
@@ -959,6 +959,7 @@
OnPriorityFrame,
(QuicStreamId id, const spdy::SpdyStreamPrecedence& precedence),
(override));
+ MOCK_METHOD(void, OnCongestionWindowChange, (QuicTime now), (override));
// Returns a QuicConsumedData that indicates all of |write_length| (and |fin|
// if set) has been consumed.