diff options
author | dimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-24 18:21:37 +0000 |
---|---|---|
committer | dimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-24 18:21:37 +0000 |
commit | ea678b000451e01b4dec557132f34deaa15eac1f (patch) | |
tree | 8f3d2505710dc34ebc26143b6c15f3292b03a8c7 /net/socket/transport_client_socket_unittest.cc | |
parent | c6ce4f6569569fb21745b698adc9ce4abb132980 (diff) | |
download | chromium_src-ea678b000451e01b4dec557132f34deaa15eac1f.zip chromium_src-ea678b000451e01b4dec557132f34deaa15eac1f.tar.gz chromium_src-ea678b000451e01b4dec557132f34deaa15eac1f.tar.bz2 |
Revert 90373 - Warmth of a connection (cwnd) is estimated by the amount of data written to the socket.
Choosing the warmest connection would mean faster resource load times.
Caused layout tests http/tests/loading/redirect-methods.html and http/tests/security/xss-DENIED-iframe-src-alias.html fail on deps WebKit bots, and caused http://code.google.com/p/chromium/issues/detail?id=87423
Deps bots failures: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20-%20chromium.org&tests=http%2Ftests%2Floading%2Fredirect-methods.html%2Chttp%2Ftests%2Fsecurity%2Fxss-DENIED-iframe-src-alias.html
idle time is the time a socket has remained idle (no http requests being served on it).
Probability of server resetting a connection increases with idle time duration.
Using a cost function that takes into account bytes transferred and idle time to pick best connection to schedule http requests on.
CODEREVIEW done in http://codereview.chromium.org/6990036/
Contributed by gagansingh@google.com
Review URL: http://codereview.chromium.org/7189055
TBR=gagansingh@google.com
Review URL: http://codereview.chromium.org/7255002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/transport_client_socket_unittest.cc')
-rw-r--r-- | net/socket/transport_client_socket_unittest.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc index 8f377e5..bb0be35 100644 --- a/net/socket/transport_client_socket_unittest.cc +++ b/net/socket/transport_client_socket_unittest.cc @@ -277,8 +277,6 @@ TEST_P(TransportClientSocketTest, Read) { rv = sock_->Read(buf, 4096, &callback); ASSERT_EQ(ERR_IO_PENDING, rv); - EXPECT_EQ(static_cast<int64>(std::string(kServerReply).size()), - sock_->NumBytesRead()); CloseServerSocket(); EXPECT_EQ(0, callback.WaitForResult()); } @@ -311,8 +309,6 @@ TEST_P(TransportClientSocketTest, Read_SmallChunks) { // then close the server socket, and note the close. rv = sock_->Read(buf, 1, &callback); - EXPECT_EQ(static_cast<int64>(std::string(kServerReply).size()), - sock_->NumBytesRead()); ASSERT_EQ(ERR_IO_PENDING, rv); CloseServerSocket(); EXPECT_EQ(0, callback.WaitForResult()); @@ -333,12 +329,9 @@ TEST_P(TransportClientSocketTest, Read_Interrupted) { scoped_refptr<IOBuffer> buf(new IOBuffer(16)); rv = sock_->Read(buf, 16, &callback); EXPECT_TRUE(rv >= 0 || rv == ERR_IO_PENDING); - EXPECT_EQ(0, sock_->NumBytesRead()); - if (rv == ERR_IO_PENDING) { + if (rv == ERR_IO_PENDING) rv = callback.WaitForResult(); - EXPECT_EQ(16, sock_->NumBytesRead()); - } EXPECT_NE(0, rv); } |