| Index: net/quic/core/quic_spdy_stream_test.cc
|
| diff --git a/net/quic/core/quic_spdy_stream_test.cc b/net/quic/core/quic_spdy_stream_test.cc
|
| index f91f88abd041ee663fba61977e2cf8d1f50fee6b..2ac223e3a3aac97029c0c5ffc45a51b2ee18372c 100644
|
| --- a/net/quic/core/quic_spdy_stream_test.cc
|
| +++ b/net/quic/core/quic_spdy_stream_test.cc
|
| @@ -388,9 +388,8 @@ TEST_P(QuicSpdyStreamTest, StreamFlowControlBlocked) {
|
|
|
| // Try to send more data than the flow control limit allows.
|
| string headers = SpdyUtils::SerializeUncompressedHeaders(headers_);
|
| - string body;
|
| const uint64_t kOverflow = 15;
|
| - GenerateBody(&body, kWindow + kOverflow);
|
| + string body(kWindow + kOverflow, 'a');
|
|
|
| EXPECT_CALL(*connection_, SendBlocked(kClientDataStreamId1));
|
| EXPECT_CALL(*session_, WritevData(_, _, _, _, _, _))
|
| @@ -427,8 +426,8 @@ TEST_P(QuicSpdyStreamTest, StreamFlowControlNoWindowUpdateIfNotConsumed) {
|
| stream_->flow_controller()));
|
|
|
| // Stream receives enough data to fill a fraction of the receive window.
|
| - string body;
|
| - GenerateBody(&body, kWindow / 3);
|
| + string body(kWindow / 3, 'a');
|
| + auto headers = AsHeaderList(headers_);
|
| ProcessHeaders(false, headers_);
|
|
|
| QuicStreamFrame frame1(kClientDataStreamId1, false, 0, StringPiece(body));
|
| @@ -463,8 +462,7 @@ TEST_P(QuicSpdyStreamTest, StreamFlowControlWindowUpdate) {
|
| stream_->flow_controller()));
|
|
|
| // Stream receives enough data to fill a fraction of the receive window.
|
| - string body;
|
| - GenerateBody(&body, kWindow / 3);
|
| + string body(kWindow / 3, 'a');
|
| ProcessHeaders(false, headers_);
|
| stream_->ConsumeHeaderList();
|
|
|
| @@ -521,8 +519,7 @@ TEST_P(QuicSpdyStreamTest, ConnectionFlowControlWindowUpdate) {
|
|
|
| // Each stream gets a quarter window of data. This should not trigger a
|
| // WINDOW_UPDATE for either stream, nor for the connection.
|
| - string body;
|
| - GenerateBody(&body, kWindow / 4);
|
| + string body(kWindow / 4, 'a');
|
| QuicStreamFrame frame1(kClientDataStreamId1, false, 0, StringPiece(body));
|
| stream_->OnStreamFrame(frame1);
|
| QuicStreamFrame frame2(kClientDataStreamId2, false, 0, StringPiece(body));
|
| @@ -558,8 +555,7 @@ TEST_P(QuicSpdyStreamTest, StreamFlowControlViolation) {
|
| ProcessHeaders(false, headers_);
|
|
|
| // Receive data to overflow the window, violating flow control.
|
| - string body;
|
| - GenerateBody(&body, kWindow + 1);
|
| + string body(kWindow + 1, 'a');
|
| QuicStreamFrame frame(kClientDataStreamId1, false, 0, StringPiece(body));
|
| EXPECT_CALL(*connection_,
|
| CloseConnection(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA, _, _));
|
| @@ -596,8 +592,7 @@ TEST_P(QuicSpdyStreamTest, ConnectionFlowControlViolation) {
|
| ProcessHeaders(false, headers_);
|
|
|
| // Send enough data to overflow the connection level flow control window.
|
| - string body;
|
| - GenerateBody(&body, kConnectionWindow + 1);
|
| + string body(kConnectionWindow + 1, 'a');
|
| EXPECT_LT(body.size(), kStreamWindow);
|
| QuicStreamFrame frame(kClientDataStreamId1, false, 0, StringPiece(body));
|
|
|
|
|