Skip to content

Commit

Permalink
Revert of Add AllReadDataConsumed and AllWriteDataConsumed methods to…
Browse files Browse the repository at this point in the history
… SocketDataProvider (patchset #5 id:80001 of https://codereview.chromium.org/1114383003/)

Reason for revert:
Even this revised patch seems to break on iOS.

http://build.chromium.org/p/chromium.mac/builders/iOS_Simulator_%28dbg%29/builds/26548/steps/net_unittests%20%28iPhone%205%20iOS%208.1%29/logs/stdio

WTF!?!?!?!!?

Original issue's description:
> Add AllReadDataConsumed and AllWriteDataConsumed methods to SocketDataProvider
> so that all provider subclasses can have their state verified.
>
> Committed: https://crrev.com/bce10d97d6fc5233071427cf622aaad7abde9e19
> Cr-Commit-Position: refs/heads/master@{#328154}
>
> Committed: https://crrev.com/269875cf0d23881a7ad119bae730ff54fdd4dd0b
> Cr-Commit-Position: refs/heads/master@{#328351}
>
> Committed: https://crrev.com/d833a674a5e4f3b4e47f229b3d5411a8d509c2c0
> Cr-Commit-Position: refs/heads/master@{#328909}

TBR=rtenneti@chromium.org,sergeyu@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1123383004

Cr-Commit-Position: refs/heads/master@{#328922}
  • Loading branch information
rch-chromium-org authored and Commit bot committed May 8, 2015
1 parent 9e53d21 commit b6dc735
Show file tree
Hide file tree
Showing 14 changed files with 215 additions and 238 deletions.
8 changes: 0 additions & 8 deletions jingle/glue/chrome_async_socket_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ class AsyncSocketDataProvider : public net::SocketDataProvider {
writes_.push_back(mock_write);
}

bool AllReadDataConsumed() const override {
return reads_.empty();
}

bool AllWriteDataConsumed() const override {
return writes_.empty();
}

private:
std::deque<net::MockRead> reads_;
bool has_pending_read_;
Expand Down
4 changes: 0 additions & 4 deletions net/ftp/ftp_network_transaction_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ class FtpSocketDataProvider : public DynamicSocketDataProvider {
Init();
}

bool AllReadDataConsumed() const override { return state_ == QUIT; }

bool AllWriteDataConsumed() const override { return state_ == QUIT; }

void set_multiline_welcome(bool multiline) { multiline_welcome_ = multiline; }

bool use_epsv() const { return use_epsv_; }
Expand Down
3 changes: 1 addition & 2 deletions net/quic/quic_http_stream_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
}

bool AtEof() {
return socket_data_->AllReadDataConsumed() &&
socket_data_->AllWriteDataConsumed();
return socket_data_->at_read_eof() && socket_data_->at_write_eof();
}

void ProcessPacket(scoped_ptr<QuicEncryptedPacket> packet) {
Expand Down
16 changes: 8 additions & 8 deletions net/quic/quic_network_transaction_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -797,18 +797,18 @@ TEST_P(QuicNetworkTransactionTest, HungAlternateProtocol) {
// Run the first request.
http_data.StopAfter(arraysize(http_reads) + arraysize(http_writes));
SendRequestAndExpectHttpResponse("hello world");
ASSERT_TRUE(http_data.AllReadDataConsumed());
ASSERT_TRUE(http_data.AllWriteDataConsumed());
ASSERT_TRUE(http_data.at_read_eof());
ASSERT_TRUE(http_data.at_write_eof());

// Now run the second request in which the QUIC socket hangs,
// and verify the the transaction continues over HTTP.
http_data2.StopAfter(arraysize(http_reads) + arraysize(http_writes));
SendRequestAndExpectHttpResponse("hello world");

ASSERT_TRUE(http_data2.AllReadDataConsumed());
ASSERT_TRUE(http_data2.AllWriteDataConsumed());
ASSERT_TRUE(!quic_data.AllReadDataConsumed());
ASSERT_TRUE(!quic_data.AllWriteDataConsumed());
ASSERT_TRUE(http_data2.at_read_eof());
ASSERT_TRUE(http_data2.at_write_eof());
ASSERT_TRUE(!quic_data.at_read_eof());
ASSERT_TRUE(!quic_data.at_write_eof());
}

TEST_P(QuicNetworkTransactionTest, ZeroRTTWithHttpRace) {
Expand Down Expand Up @@ -1078,8 +1078,8 @@ TEST_P(QuicNetworkTransactionTest, FailedZeroRttBrokenAlternateProtocol) {

ExpectBrokenAlternateProtocolMapping();

EXPECT_TRUE(quic_data.AllReadDataConsumed());
EXPECT_TRUE(quic_data.AllWriteDataConsumed());
EXPECT_TRUE(quic_data.at_read_eof());
EXPECT_TRUE(quic_data.at_write_eof());
}

TEST_P(QuicNetworkTransactionTest, DISABLED_HangingZeroRttFallback) {
Expand Down
Loading

0 comments on commit b6dc735

Please sign in to comment.