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

Unified Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 2994003: Refactor how ClientSocketPoolBaseHelper avoids re-entrancy. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge. Created 10 years, 5 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/socket/client_socket_pool_base.cc ('k') | net/socket/socket_test_util.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 53063bab0ee16c7d2e56d008ce347c34cb7bd8a3..968679485aceaf831d09391e347389c0b7840f7e 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -370,7 +370,7 @@ class TestClientSocketPool : public ClientSocketPool {
virtual void CancelRequest(
const std::string& group_name,
- const ClientSocketHandle* handle) {
+ ClientSocketHandle* handle) {
base_.CancelRequest(group_name, handle);
}
@@ -521,8 +521,10 @@ class ClientSocketPoolBaseTest : public ClientSocketPoolTest {
// to delete |requests_| because the pool is reference counted and requests
// keep reference to it.
// TODO(willchan): Remove this part when late binding becomes the default.
+ TestClientSocketPool* pool = pool_.get();
pool_ = NULL;
requests_.reset();
+ pool = NULL;
ClientSocketPoolTest::TearDown();
}
@@ -934,11 +936,6 @@ TEST_F(ClientSocketPoolBaseTest, CancelPendingSocketAtSocketLimit) {
// Cancel the stalled request.
handles[0].Reset();
- // Wait for the pending job to be guaranteed to complete.
- PlatformThread::Sleep(TestConnectJob::kPendingConnectDelay * 2);
-
- MessageLoop::current()->RunAllPending();
-
// Now we should have a connect job.
EXPECT_EQ(1, pool_->NumConnectJobsInGroup("foo"));
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698