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

Unified Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 11464028: Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 8 years 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/socket/client_socket_pool_base.cc ('k') | net/socket/client_socket_pool_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_base_unittest.cc
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index dbbeb5d44985d1483705115ece71c87a1c4bf04b..f55dadb8dac36a1990b27376a8c16ddfd508767d 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -476,8 +476,8 @@ class TestClientSocketPool : public ClientSocketPool {
base_.ReleaseSocket(group_name, socket, id);
}
- virtual void Flush() OVERRIDE {
- base_.Flush();
+ virtual void FlushWithError(int error) OVERRIDE {
+ base_.FlushWithError(error);
}
virtual bool IsStalled() const OVERRIDE {
@@ -2486,7 +2486,7 @@ TEST_F(ClientSocketPoolBaseTest, CallbackThatReleasesPool) {
pool_.get(),
BoundNetLog()));
- pool_->Flush();
+ pool_->FlushWithError(ERR_NETWORK_CHANGED);
// We'll call back into this now.
callback.WaitForResult();
@@ -2507,7 +2507,7 @@ TEST_F(ClientSocketPoolBaseTest, DoNotReuseSocketAfterFlush) {
EXPECT_EQ(OK, callback.WaitForResult());
EXPECT_EQ(ClientSocketHandle::UNUSED, handle.reuse_type());
- pool_->Flush();
+ pool_->FlushWithError(ERR_NETWORK_CHANGED);
handle.Reset();
MessageLoop::current()->RunUntilIdle();
@@ -2584,8 +2584,8 @@ TEST_F(ClientSocketPoolBaseTest, AbortAllRequestsOnFlush) {
// Second job will be started during the first callback, and will
// asynchronously complete with OK.
connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
- pool_->Flush();
- EXPECT_EQ(ERR_ABORTED, callback.WaitForResult());
+ pool_->FlushWithError(ERR_NETWORK_CHANGED);
+ EXPECT_EQ(ERR_NETWORK_CHANGED, callback.WaitForResult());
EXPECT_EQ(OK, callback.WaitForNestedResult());
}
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | net/socket/client_socket_pool_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698