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 3c2073cfec610c66fbcb777871c978946eadfe69..5c90944eda00edb3d24237416b2c523a82726471 100644 |
--- a/net/spdy/spdy_network_transaction_unittest.cc |
+++ b/net/spdy/spdy_network_transaction_unittest.cc |
@@ -270,12 +270,14 @@ |
void VerifyDataConsumed() { |
for (DataVector::iterator it = data_vector_.begin(); |
it != data_vector_.end(); ++it) { |
- EXPECT_TRUE((*it)->AllReadDataConsumed()) |
- << "Read count: " << (*it)->read_count() |
- << " Read index: " << (*it)->read_index(); |
- EXPECT_TRUE((*it)->AllWriteDataConsumed()) |
- << "Write count: " << (*it)->write_count() |
- << " Write index: " << (*it)->write_index(); |
+ EXPECT_TRUE((*it)->at_read_eof()) << "Read count: " |
+ << (*it)->read_count() |
+ << " Read index: " |
+ << (*it)->read_index(); |
+ EXPECT_TRUE((*it)->at_write_eof()) << "Write count: " |
+ << (*it)->write_count() |
+ << " Write index: " |
+ << (*it)->write_index(); |
} |
} |
@@ -285,12 +287,14 @@ |
void VerifyDataNotConsumed() { |
for (DataVector::iterator it = data_vector_.begin(); |
it != data_vector_.end(); ++it) { |
- EXPECT_TRUE(!(*it)->AllReadDataConsumed()) |
- << "Read count: " << (*it)->read_count() |
- << " Read index: " << (*it)->read_index(); |
- EXPECT_TRUE(!(*it)->AllWriteDataConsumed()) |
- << "Write count: " << (*it)->write_count() |
- << " Write index: " << (*it)->write_index(); |
+ EXPECT_TRUE(!(*it)->at_read_eof()) << "Read count: " |
+ << (*it)->read_count() |
+ << " Read index: " |
+ << (*it)->read_index(); |
+ EXPECT_TRUE(!(*it)->at_write_eof()) << "Write count: " |
+ << (*it)->write_count() |
+ << " Write index: " |
+ << (*it)->write_index(); |
} |
} |
@@ -643,8 +647,8 @@ |
ReadResult(trans, data, &result); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data->AllReadDataConsumed()); |
- EXPECT_TRUE(data->AllWriteDataConsumed()); |
+ EXPECT_TRUE(data->at_read_eof()); |
+ EXPECT_TRUE(data->at_write_eof()); |
// Verify that the received push data is same as the expected push data. |
EXPECT_EQ(result2.compare(expected), 0) << "Received data: " |
@@ -2484,10 +2488,10 @@ |
std::string contents("hello!"); |
EXPECT_EQ(contents, d.data_received()); |
} |
- EXPECT_TRUE(data.AllReadDataConsumed()); |
- EXPECT_TRUE(data.AllWriteDataConsumed()); |
- EXPECT_TRUE(data2.AllReadDataConsumed()); |
- EXPECT_TRUE(data2.AllWriteDataConsumed()); |
+ EXPECT_TRUE(data.at_read_eof()); |
+ EXPECT_TRUE(data.at_write_eof()); |
+ EXPECT_TRUE(data2.at_read_eof()); |
+ EXPECT_TRUE(data2.at_write_eof()); |
} |
// Send a spdy request to www.example.org. Get a pushed stream that redirects to |
@@ -2579,10 +2583,10 @@ |
} |
data.CompleteRead(); |
data2.CompleteRead(); |
- EXPECT_TRUE(data.AllReadDataConsumed()); |
- EXPECT_TRUE(data.AllWriteDataConsumed()); |
- EXPECT_TRUE(data2.AllReadDataConsumed()); |
- EXPECT_TRUE(data2.AllWriteDataConsumed()); |
+ EXPECT_TRUE(data.at_read_eof()); |
+ EXPECT_TRUE(data.at_write_eof()); |
+ EXPECT_TRUE(data2.at_read_eof()); |
+ EXPECT_TRUE(data2.at_write_eof()); |
} |
TEST_P(SpdyNetworkTransactionTest, ServerPushSingleDataFrame) { |
@@ -2757,12 +2761,14 @@ |
EXPECT_EQ(OK, rv); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()) |
- << "Read count: " << data.read_count() |
- << " Read index: " << data.read_index(); |
- EXPECT_TRUE(data.AllWriteDataConsumed()) |
- << "Write count: " << data.write_count() |
- << " Write index: " << data.write_index(); |
+ EXPECT_TRUE(data.at_read_eof()) << "Read count: " |
+ << data.read_count() |
+ << " Read index: " |
+ << data.read_index(); |
+ EXPECT_TRUE(data.at_write_eof()) << "Write count: " |
+ << data.write_count() |
+ << " Write index: " |
+ << data.write_index(); |
// Verify the SYN_REPLY. |
HttpResponseInfo response = *trans->GetResponseInfo(); |
@@ -2980,12 +2986,14 @@ |
EXPECT_EQ(OK, rv); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()) |
- << "Read count: " << data.read_count() |
- << " Read index: " << data.read_index(); |
- EXPECT_TRUE(data.AllWriteDataConsumed()) |
- << "Write count: " << data.write_count() |
- << " Write index: " << data.write_index(); |
+ EXPECT_TRUE(data.at_read_eof()) << "Read count: " |
+ << data.read_count() |
+ << " Read index: " |
+ << data.read_index(); |
+ EXPECT_TRUE(data.at_write_eof()) << "Write count: " |
+ << data.write_count() |
+ << " Write index: " |
+ << data.write_index(); |
// Verify the SYN_REPLY. |
HttpResponseInfo response = *trans->GetResponseInfo(); |
@@ -3035,12 +3043,14 @@ |
EXPECT_EQ(OK, rv); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()) |
- << "Read count: " << data.read_count() |
- << " Read index: " << data.read_index(); |
- EXPECT_TRUE(data.AllWriteDataConsumed()) |
- << "Write count: " << data.write_count() |
- << " Write index: " << data.write_index(); |
+ EXPECT_TRUE(data.at_read_eof()) << "Read count: " |
+ << data.read_count() |
+ << " Read index: " |
+ << data.read_index(); |
+ EXPECT_TRUE(data.at_write_eof()) << "Write count: " |
+ << data.write_count() |
+ << " Write index: " |
+ << data.write_index(); |
// Verify the SYN_REPLY. |
HttpResponseInfo response = *trans->GetResponseInfo(); |
@@ -3093,12 +3103,14 @@ |
rv = callback.WaitForResult(); |
EXPECT_EQ(OK, rv); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()) |
- << "Read count: " << data.read_count() |
- << " Read index: " << data.read_index(); |
- EXPECT_TRUE(data.AllWriteDataConsumed()) |
- << "Write count: " << data.write_count() |
- << " Write index: " << data.write_index(); |
+ EXPECT_TRUE(data.at_read_eof()) << "Read count: " |
+ << data.read_count() |
+ << " Read index: " |
+ << data.read_index(); |
+ EXPECT_TRUE(data.at_write_eof()) << "Write count: " |
+ << data.write_count() |
+ << " Write index: " |
+ << data.write_index(); |
// Verify the SYN_REPLY. |
HttpResponseInfo response = *trans->GetResponseInfo(); |
@@ -3567,8 +3579,8 @@ |
EXPECT_TRUE(helper.StartDefaultTest()); |
data.RunFor(2); |
helper.FinishDefaultTest(); |
- EXPECT_TRUE(data.AllWriteDataConsumed()); |
- EXPECT_TRUE(!data.AllReadDataConsumed()); |
+ EXPECT_TRUE(data.at_write_eof()); |
+ EXPECT_TRUE(!data.at_read_eof()); |
TransactionHelperResult out = helper.output(); |
EXPECT_EQ(ERR_FAILED, out.rv); |
} |
@@ -5266,8 +5278,8 @@ |
data.RunFor(1); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()); |
- EXPECT_TRUE(data.AllWriteDataConsumed()); |
+ EXPECT_TRUE(data.at_read_eof()); |
+ EXPECT_TRUE(data.at_write_eof()); |
} |
// TODO(baranovich): HTTP 2 does not allow multiple HEADERS frames |
@@ -5406,8 +5418,8 @@ |
data.RunFor(1); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()); |
- EXPECT_TRUE(data.AllWriteDataConsumed()); |
+ EXPECT_TRUE(data.at_read_eof()); |
+ EXPECT_TRUE(data.at_write_eof()); |
} |
TEST_P(SpdyNetworkTransactionTest, ServerPushWithNoStatusHeaderFrames) { |
@@ -5513,8 +5525,8 @@ |
data.RunFor(1); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()); |
- EXPECT_TRUE(data.AllWriteDataConsumed()); |
+ EXPECT_TRUE(data.at_read_eof()); |
+ EXPECT_TRUE(data.at_write_eof()); |
} |
TEST_P(SpdyNetworkTransactionTest, SynReplyWithHeaders) { |
@@ -5702,8 +5714,8 @@ |
ReadResult(trans, &data, &result); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()); |
- EXPECT_TRUE(data.AllWriteDataConsumed()); |
+ EXPECT_TRUE(data.at_read_eof()); |
+ EXPECT_TRUE(data.at_write_eof()); |
// Verify the SYN_REPLY. |
// Copy the response info, because trans goes away. |
@@ -5758,12 +5770,14 @@ |
EXPECT_EQ(OK, rv); |
// Verify that we consumed all test data. |
- EXPECT_TRUE(data.AllReadDataConsumed()) |
- << "Read count: " << data.read_count() |
- << " Read index: " << data.read_index(); |
- EXPECT_TRUE(data.AllWriteDataConsumed()) |
- << "Write count: " << data.write_count() |
- << " Write index: " << data.write_index(); |
+ EXPECT_TRUE(data.at_read_eof()) << "Read count: " |
+ << data.read_count() |
+ << " Read index: " |
+ << data.read_index(); |
+ EXPECT_TRUE(data.at_write_eof()) << "Write count: " |
+ << data.write_count() |
+ << " Write index: " |
+ << data.write_index(); |
// Verify the SYN_REPLY. |
HttpResponseInfo response = *trans->GetResponseInfo(); |