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

Unified Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 1123393005: Remove redundant at_read_eof and at_write_eof methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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_http_stream_unittest.cc ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 78242df6c0061856c260557442a1cdd58443dcca..dfb1ed526a7fb9d15656441ed92666b08874aa17 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -627,8 +627,8 @@ class SpdyNetworkTransactionTest
ReadResult(trans, data, &result);
// Verify that we consumed all test data.
- EXPECT_TRUE(data->at_read_eof());
- EXPECT_TRUE(data->at_write_eof());
+ EXPECT_TRUE(data->AllReadDataConsumed());
+ EXPECT_TRUE(data->AllWriteDataConsumed());
// Verify that the received push data is same as the expected push data.
EXPECT_EQ(result2.compare(expected), 0) << "Received data: "
@@ -2440,10 +2440,10 @@ TEST_P(SpdyNetworkTransactionTest, DISABLED_RedirectGetRequest) {
std::string contents("hello!");
EXPECT_EQ(contents, d.data_received());
}
- EXPECT_TRUE(data.at_read_eof());
- EXPECT_TRUE(data.at_write_eof());
- EXPECT_TRUE(data2.at_read_eof());
- EXPECT_TRUE(data2.at_write_eof());
+ EXPECT_TRUE(data.AllReadDataConsumed());
+ EXPECT_TRUE(data.AllWriteDataConsumed());
+ EXPECT_TRUE(data2.AllReadDataConsumed());
+ EXPECT_TRUE(data2.AllWriteDataConsumed());
}
// Send a spdy request to www.example.org. Get a pushed stream that redirects to
@@ -3480,8 +3480,8 @@ TEST_P(SpdyNetworkTransactionTest, WriteError) {
EXPECT_TRUE(helper.StartDefaultTest());
data.RunFor(2);
helper.FinishDefaultTest();
- EXPECT_TRUE(data.at_write_eof());
- EXPECT_TRUE(!data.at_read_eof());
+ EXPECT_TRUE(data.AllWriteDataConsumed());
+ EXPECT_TRUE(!data.AllReadDataConsumed());
TransactionHelperResult out = helper.output();
EXPECT_EQ(ERR_FAILED, out.rv);
}
@@ -5175,8 +5175,8 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushClaimBeforeHeaders) {
data.RunFor(1);
// Verify that we consumed all test data.
- EXPECT_TRUE(data.at_read_eof());
- EXPECT_TRUE(data.at_write_eof());
+ EXPECT_TRUE(data.AllReadDataConsumed());
+ EXPECT_TRUE(data.AllWriteDataConsumed());
}
// TODO(baranovich): HTTP 2 does not allow multiple HEADERS frames
@@ -5315,8 +5315,8 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
data.RunFor(1);
// Verify that we consumed all test data.
- EXPECT_TRUE(data.at_read_eof());
- EXPECT_TRUE(data.at_write_eof());
+ EXPECT_TRUE(data.AllReadDataConsumed());
+ EXPECT_TRUE(data.AllWriteDataConsumed());
}
TEST_P(SpdyNetworkTransactionTest, ServerPushWithNoStatusHeaderFrames) {
@@ -5421,8 +5421,8 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushWithNoStatusHeaderFrames) {
data.RunFor(1);
// Verify that we consumed all test data.
- EXPECT_TRUE(data.at_read_eof());
- EXPECT_TRUE(data.at_write_eof());
+ EXPECT_TRUE(data.AllReadDataConsumed());
+ EXPECT_TRUE(data.AllWriteDataConsumed());
}
TEST_P(SpdyNetworkTransactionTest, SynReplyWithHeaders) {
@@ -5606,8 +5606,8 @@ TEST_P(SpdyNetworkTransactionTest, ServerPushCrossOriginCorrectness) {
ReadResult(trans, &data, &result);
// Verify that we consumed all test data.
- EXPECT_TRUE(data.at_read_eof());
- EXPECT_TRUE(data.at_write_eof());
+ EXPECT_TRUE(data.AllReadDataConsumed());
+ EXPECT_TRUE(data.AllWriteDataConsumed());
// Verify the SYN_REPLY.
// Copy the response info, because trans goes away.
« no previous file with comments | « net/spdy/spdy_http_stream_unittest.cc ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698