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

Unified Diff: net/quic/core/quic_spdy_stream_test.cc

Issue 2731203002: Fix QuicSpdyStreamTest. (Closed)
Patch Set: Rebase Created 3 years, 9 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/core/quic_flags_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 04d32fc7ccf5b0b2fc9909ecf73c54543de3b147..cdea611b8eb8cf7b6b46b865002a1c3b36da2c2a 100644
--- a/net/quic/core/quic_spdy_stream_test.cc
+++ b/net/quic/core/quic_spdy_stream_test.cc
@@ -17,8 +17,8 @@
#include "net/quic/test_tools/quic_session_peer.h"
#include "net/quic/test_tools/quic_stream_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
-#include "net/test/gtest_util.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
using base::StringPiece;
using std::string;
@@ -752,9 +752,11 @@ TEST_P(QuicSpdyStreamTest, ReceivingTrailersWithoutFin) {
auto headers = AsHeaderList(headers_);
stream_->OnStreamHeaderList(/*fin=*/false,
headers.uncompressed_header_bytes(), headers);
+ stream_->ConsumeHeaderList();
// Receive trailing headers with FIN deliberately set to false.
SpdyHeaderBlock trailers_block;
+ trailers_block["foo"] = "bar";
auto trailers = AsHeaderList(trailers_block);
EXPECT_CALL(*connection_,
@@ -774,6 +776,7 @@ TEST_P(QuicSpdyStreamTest, ReceivingTrailersAfterHeadersWithFin) {
// Receive trailing headers after FIN already received.
SpdyHeaderBlock trailers_block;
+ trailers_block["foo"] = "bar";
EXPECT_CALL(*connection_,
CloseConnection(QUIC_INVALID_HEADERS_STREAM_DATA, _, _))
.Times(1);
@@ -794,10 +797,11 @@ TEST_P(QuicSpdyStreamTest, ReceivingTrailersAfterBodyWithFin) {
// Receive trailing headers after FIN already received.
SpdyHeaderBlock trailers_block;
+ trailers_block["foo"] = "bar";
EXPECT_CALL(*connection_,
CloseConnection(QUIC_INVALID_HEADERS_STREAM_DATA, _, _))
.Times(1);
- ProcessHeaders(false, trailers_block);
+ ProcessHeaders(true, trailers_block);
}
TEST_P(QuicSpdyStreamTest, ClosingStreamWithNoTrailers) {
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698