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

Unified Diff: net/spdy/spdy_stream_spdy3_unittest.cc

Issue 14311002: [SPDY] Avoid leaking bytes from the session flow control receive window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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/spdy/spdy_stream_spdy2_unittest.cc ('k') | net/spdy/spdy_stream_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream_spdy3_unittest.cc
diff --git a/net/spdy/spdy_stream_spdy3_unittest.cc b/net/spdy/spdy_stream_spdy3_unittest.cc
index 78c68553b79789eaeb9d7212a3a6a7e48e7983fb..7f787be8ab53a1d08bdc59445542587e4353d263 100644
--- a/net/spdy/spdy_stream_spdy3_unittest.cc
+++ b/net/spdy/spdy_stream_spdy3_unittest.cc
@@ -131,7 +131,8 @@ TEST_F(SpdyStreamSpdy3Test, SendDataAfterOpen) {
EXPECT_TRUE(delegate.send_headers_completed());
EXPECT_EQ("200", delegate.GetResponseHeaderValue(":status"));
EXPECT_EQ("HTTP/1.1", delegate.GetResponseHeaderValue(":version"));
- EXPECT_EQ(std::string(kPostBody, kPostBodyLength), delegate.received_data());
+ EXPECT_EQ(std::string(kPostBody, kPostBodyLength),
+ delegate.TakeReceivedData());
EXPECT_EQ(static_cast<int>(kPostBodyLength), delegate.data_sent());
}
@@ -209,7 +210,7 @@ TEST_F(SpdyStreamSpdy3Test, SendHeaderAndDataAfterOpen) {
EXPECT_TRUE(delegate.send_headers_completed());
EXPECT_EQ("101", delegate.GetResponseHeaderValue(":status"));
EXPECT_EQ(1, delegate.headers_sent());
- EXPECT_EQ(std::string(), delegate.received_data());
+ EXPECT_EQ(std::string(), delegate.TakeReceivedData());
EXPECT_EQ(6, delegate.data_sent());
}
@@ -328,7 +329,8 @@ TEST_F(SpdyStreamSpdy3Test, StreamError) {
EXPECT_TRUE(delegate.send_headers_completed());
EXPECT_EQ("200", delegate.GetResponseHeaderValue(":status"));
EXPECT_EQ("HTTP/1.1", delegate.GetResponseHeaderValue(":version"));
- EXPECT_EQ(std::string(kPostBody, kPostBodyLength), delegate.received_data());
+ EXPECT_EQ(std::string(kPostBody, kPostBodyLength),
+ delegate.TakeReceivedData());
EXPECT_EQ(static_cast<int>(kPostBodyLength), delegate.data_sent());
// Check that the NetLog was filled reasonably.
@@ -478,7 +480,8 @@ TEST_F(SpdyStreamSpdy3Test, ResumeAfterSendWindowSizeIncrease) {
EXPECT_TRUE(delegate.send_headers_completed());
EXPECT_EQ("200", delegate.GetResponseHeaderValue(":status"));
EXPECT_EQ("HTTP/1.1", delegate.GetResponseHeaderValue(":version"));
- EXPECT_EQ(std::string(kPostBody, kPostBodyLength), delegate.received_data());
+ EXPECT_EQ(std::string(kPostBody, kPostBodyLength),
+ delegate.TakeReceivedData());
EXPECT_EQ(static_cast<int>(kPostBodyLength), delegate.body_data_sent());
}
@@ -569,7 +572,8 @@ TEST_F(SpdyStreamSpdy3Test, ResumeAfterSendWindowSizeAdjust) {
EXPECT_TRUE(delegate.send_headers_completed());
EXPECT_EQ("200", delegate.GetResponseHeaderValue(":status"));
EXPECT_EQ("HTTP/1.1", delegate.GetResponseHeaderValue(":version"));
- EXPECT_EQ(std::string(kPostBody, kPostBodyLength), delegate.received_data());
+ EXPECT_EQ(std::string(kPostBody, kPostBodyLength),
+ delegate.TakeReceivedData());
EXPECT_EQ(static_cast<int>(kPostBodyLength), delegate.body_data_sent());
}
« no previous file with comments | « net/spdy/spdy_stream_spdy2_unittest.cc ('k') | net/spdy/spdy_stream_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698