Lines Matching refs:pool_
690 DCHECK(!pool_.get());
693 pool_.reset(new TestClientSocketPool(max_sockets,
707 pool_.get(), group_name, priority, params);
738 scoped_ptr<TestClientSocketPool> pool_;
817 pool_.get(),
860 pool_.get(),
1100 pool_.get(),
1111 pool_.get(),
1134 pool_.get(),
1145 pool_.get(),
1152 EXPECT_EQ(0, pool_->IdleSocketCount());
1158 EXPECT_EQ(kDefaultMaxSockets, pool_->IdleSocketCount());
1173 pool_.get(),
1185 pool_.get(),
1189 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("foo"));
1190 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("foo"));
1196 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("foo"));
1197 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("foo"));
1204 EXPECT_EQ(0, pool_->IdleSocketCount());
1205 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("foo"));
1206 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("foo"));
1211 EXPECT_EQ(1, pool_->IdleSocketCount());
1221 EXPECT_FALSE(pool_->IsStalled());
1230 pool_.get(),
1235 EXPECT_EQ(0, pool_->IdleSocketCount());
1236 EXPECT_FALSE(pool_->IsStalled());
1243 pool_.get(),
1245 EXPECT_TRUE(pool_->IsStalled());
1255 EXPECT_EQ(3, pool_->IdleSocketCount());
1261 pool_->EnableConnectBackupJobs();
1271 pool_.get(),
1291 pool_.get(),
1295 EXPECT_EQ(kDefaultMaxSockets - 1, pool_->IdleSocketCount());
1365 pool_.get(),
1381 pool_.get(),
1392 pool_.get(),
1444 pool_(pool),
1483 pool_,
1513 TestClientSocketPool* const pool_;
1526 &handle, pool_.get(), connect_job_factory_,
1532 pool_.get(),
1545 &handle, pool_.get(), connect_job_factory_, TestConnectJob::kMockJob);
1550 pool_.get(),
1618 pool_.get(),
1629 pool_.get(),
1669 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
1670 pool_->CloseIdleSockets();
1687 pool_.get(),
1690 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
1734 pool_.get(),
1736 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
1770 pool_.get(),
1778 pool_.get(),
1803 EXPECT_EQ(kDefaultMaxSocketsPerGroup, pool_->NumConnectJobsInGroup("a"));
1806 EXPECT_EQ(kDefaultMaxSocketsPerGroup, pool_
1809 EXPECT_EQ(kDefaultMaxSocketsPerGroup, pool_->NumConnectJobsInGroup("a"));
1812 EXPECT_EQ(kDefaultMaxSocketsPerGroup, pool_->NumConnectJobsInGroup("a"));
1829 req1.callback(), pool_.get(),
1843 pool_.get(),
1851 pool_.get(),
1873 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
1890 pool_.get(),
1899 pool_.get(),
1911 pool_.get(),
1936 pool_.get(),
1959 pool_.get(),
1969 pool_.get(),
2004 pool_.get(),
2017 pool_.get(),
2052 pool_.get(),
2063 pool_.get(),
2075 pool_.get(),
2108 pool_.get(), BoundNetLog()));
2125 pool_.get(),
2127 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
2145 pool_.get(),
2165 pool_.get(),
2167 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
2193 pool_.get(),
2196 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
2205 ASSERT_EQ(1, pool_->IdleSocketCount());
2214 pool_.get(),
2220 ASSERT_TRUE(pool_->HasGroup("a"));
2221 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
2222 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
2250 pool_.get(),
2253 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
2261 pool_.get(),
2264 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle2));
2285 ASSERT_EQ(2, pool_->IdleSocketCount());
2295 pool_.get(),
2302 ASSERT_TRUE(pool_->HasGroup("a"));
2303 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
2304 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
2328 pool_.get(),
2331 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle));
2339 pool_.get(),
2342 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", &handle2));
2362 ASSERT_EQ(2, pool_->IdleSocketCount());
2367 pool_->CleanupTimedOutIdleSockets();
2373 pool_.get(),
2402 pool_.get(),
2412 pool_.get(),
2422 pool_.get(),
2432 pool_.get(),
2472 pool_.get(),
2478 pool_.get(),
2490 pool_.get(),
2497 pool_.get(),
2562 : pool_(pool),
2584 callback2_.callback(), pool_, BoundNetLog()));
2587 TestClientSocketPool* const pool_;
2609 TestReleasingSocketRequest req(pool_.get(), OK, false);
2612 pool_.get(), BoundNetLog()));
2641 pool_.get(),
2644 pool_->FlushWithError(ERR_NETWORK_CHANGED);
2660 pool_.get(),
2665 pool_->FlushWithError(ERR_NETWORK_CHANGED);
2674 pool_.get(),
2688 pool_(pool),
2709 pool_,
2715 TestClientSocketPool* const pool_;
2730 ConnectWithinCallback callback("a", params_, pool_.get());
2735 pool_.get(),
2741 pool_->FlushWithError(ERR_NETWORK_CHANGED);
2751 pool_->EnableConnectBackupJobs();
2762 pool_.get(),
2774 pool_.get(),
2793 pool_->EnableConnectBackupJobs();
2804 pool_.get(),
2806 ASSERT_TRUE(pool_->HasGroup("bar"));
2807 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("bar"));
2808 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("bar"));
2817 ASSERT_TRUE(pool_->HasGroup("bar"));
2818 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("bar"));
2823 pool_->EnableConnectBackupJobs();
2834 pool_.get(),
2843 pool_.get(),
2845 ASSERT_TRUE(pool_->HasGroup("bar"));
2846 EXPECT_EQ(2, pool_->NumConnectJobsInGroup("bar"));
2873 pool_.get(),
2878 EXPECT_EQ(0, pool_->IdleSocketCount());
2879 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
2889 pool_.get(),
2892 EXPECT_EQ(0, pool_->IdleSocketCount());
2893 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
2902 EXPECT_EQ(0, pool_->IdleSocketCount());
2903 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
2909 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
2913 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
2931 pool_.get(),
2936 EXPECT_EQ(0, pool_->IdleSocketCount());
2937 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
2947 pool_.get(),
2950 EXPECT_EQ(0, pool_->IdleSocketCount());
2951 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
2960 EXPECT_EQ(0, pool_->IdleSocketCount());
2961 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
2967 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
2971 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
2991 pool_.get(),
2996 EXPECT_EQ(0, pool_->IdleSocketCount());
2997 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3007 pool_.get(),
3010 EXPECT_EQ(0, pool_->IdleSocketCount());
3011 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3020 EXPECT_EQ(0, pool_->IdleSocketCount());
3021 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3027 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3031 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3054 pool_.get(),
3056 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3070 pool_.get(),
3073 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3077 EXPECT_FALSE(pool_->HasGroup("a"));
3091 pool_.get(),
3100 pool_.get(),
3108 pool_.get(),
3127 pool_.get(),
3133 pool_.get(),
3139 pool_.get(),
3151 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3153 ASSERT_TRUE(pool_->HasGroup("a"));
3154 EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
3155 EXPECT_EQ(2, pool_->NumUnassignedConnectJobsInGroup("a"));
3156 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3164 pool_.get(),
3173 pool_.get(),
3176 EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
3177 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3178 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3185 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3186 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3187 EXPECT_EQ(2, pool_->IdleSocketCountInGroup("a"));
3200 pool_.get(),
3203 ASSERT_TRUE(pool_->HasGroup("a"));
3204 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3205 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3206 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3208 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3210 EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
3211 EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
3212 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3220 pool_.get(),
3223 EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
3224 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3225 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3232 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3233 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3234 EXPECT_EQ(2, pool_->IdleSocketCountInGroup("a"));
3248 pool_.get(),
3257 pool_.get(),
3266 pool_.get(),
3269 ASSERT_TRUE(pool_->HasGroup("a"));
3270 EXPECT_EQ(3, pool_->NumConnectJobsInGroup("a"));
3271 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3272 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3274 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3276 EXPECT_EQ(3, pool_->NumConnectJobsInGroup("a"));
3277 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3278 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3287 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3288 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3289 EXPECT_EQ(3, pool_->IdleSocketCountInGroup("a"));
3296 ASSERT_FALSE(pool_->HasGroup("a"));
3298 pool_->RequestSockets("a", ¶ms_, kDefaultMaxSockets,
3301 ASSERT_TRUE(pool_->HasGroup("a"));
3302 EXPECT_EQ(kDefaultMaxSockets, pool_->NumConnectJobsInGroup("a"));
3303 EXPECT_EQ(kDefaultMaxSockets, pool_->NumUnassignedConnectJobsInGroup("a"));
3305 ASSERT_FALSE(pool_->HasGroup("b"));
3307 pool_->RequestSockets("b", ¶ms_, kDefaultMaxSockets,
3310 ASSERT_FALSE(pool_->HasGroup("b"));
3317 ASSERT_FALSE(pool_->HasGroup("a"));
3319 pool_->RequestSockets("a", ¶ms_, kDefaultMaxSockets - 1,
3322 ASSERT_TRUE(pool_->HasGroup("a"));
3323 EXPECT_EQ(kDefaultMaxSockets - 1, pool_->NumConnectJobsInGroup("a"));
3325 pool_->NumUnassignedConnectJobsInGroup("a"));
3326 EXPECT_FALSE(pool_->IsStalled());
3328 ASSERT_FALSE(pool_->HasGroup("b"));
3330 pool_->RequestSockets("b", ¶ms_, kDefaultMaxSockets,
3333 ASSERT_TRUE(pool_->HasGroup("b"));
3334 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("b"));
3335 EXPECT_FALSE(pool_->IsStalled());
3348 pool_.get(),
3353 ASSERT_TRUE(pool_->HasGroup("a"));
3354 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3355 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3356 EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
3358 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3360 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3361 EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
3362 EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
3375 pool_.get(),
3379 ASSERT_TRUE(pool_->HasGroup("a"));
3380 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3381 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3382 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3383 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
3385 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3387 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3388 EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
3389 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3390 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
3397 pool_->RequestSockets("a", ¶ms_, kDefaultMaxSocketsPerGroup,
3400 ASSERT_TRUE(pool_->HasGroup("a"));
3401 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3402 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3403 EXPECT_EQ(kDefaultMaxSocketsPerGroup, pool_->IdleSocketCountInGroup("a"));
3405 pool_->RequestSockets("b", ¶ms_, kDefaultMaxSocketsPerGroup,
3408 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("b"));
3409 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("b"));
3410 EXPECT_EQ(kDefaultMaxSocketsPerGroup, pool_->IdleSocketCountInGroup("b"));
3417 pool_->RequestSockets("a", ¶ms_, kDefaultMaxSocketsPerGroup,
3420 ASSERT_FALSE(pool_->HasGroup("a"));
3424 pool_->RequestSockets("a", ¶ms_, kDefaultMaxSocketsPerGroup,
3427 ASSERT_FALSE(pool_->HasGroup("a"));
3434 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3436 ASSERT_TRUE(pool_->HasGroup("a"));
3437 EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
3438 EXPECT_EQ(2, pool_->NumUnassignedConnectJobsInGroup("a"));
3439 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3441 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3442 EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
3443 EXPECT_EQ(2, pool_->NumUnassignedConnectJobsInGroup("a"));
3444 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3452 pool_.get(),
3462 pool_.get(),
3469 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3470 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3471 EXPECT_EQ(2, pool_->NumActiveSocketsInGroup("a"));
3472 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3477 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3478 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3479 EXPECT_EQ(2, pool_->IdleSocketCountInGroup("a"));
3481 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3482 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3483 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3484 EXPECT_EQ(2, pool_->IdleSocketCountInGroup("a"));
3491 pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
3493 ASSERT_TRUE(pool_->HasGroup("a"));
3494 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3495 EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
3496 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3498 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3499 EXPECT_EQ(2, pool_->NumConnectJobsInGroup("a"));
3500 EXPECT_EQ(2, pool_->NumUnassignedConnectJobsInGroup("a"));
3501 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3503 pool_->RequestSockets("a", ¶ms_, 3, BoundNetLog());
3504 EXPECT_EQ(3, pool_->NumConnectJobsInGroup("a"));
3505 EXPECT_EQ(3, pool_->NumUnassignedConnectJobsInGroup("a"));
3506 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3508 pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
3509 EXPECT_EQ(3, pool_->NumConnectJobsInGroup("a"));
3510 EXPECT_EQ(3, pool_->NumUnassignedConnectJobsInGroup("a"));
3511 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3518 pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
3520 ASSERT_TRUE(pool_->HasGroup("a"));
3521 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3522 EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
3523 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3531 pool_.get(),
3534 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3535 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3536 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3545 EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
3553 pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
3555 ASSERT_TRUE(pool_->HasGroup("a"));
3556 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3557 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3558 EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
3566 pool_.get(),
3570 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3594 pool_.get(),
3599 EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
3608 pool_.get(),
3614 pool_.get(),
3619 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("b"));
3620 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("b"));
3621 EXPECT_EQ(2, pool_->NumActiveSocketsInGroup("b"));
3628 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3629 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
3630 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3631 EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
3632 EXPECT_EQ(0, pool_->NumActiveSocketsInGroup("a"));
3633 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("b"));
3634 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("b"));
3635 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("b"));
3636 EXPECT_EQ(2, pool_->NumActiveSocketsInGroup("b"));
3643 EXPECT_EQ(2, pool_->IdleSocketCountInGroup("b"));
3644 EXPECT_EQ(0, pool_->NumActiveSocketsInGroup("b"));
3646 pool_->RequestSockets("a", ¶ms_, 2, BoundNetLog());
3647 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3648 EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
3649 EXPECT_EQ(1, pool_->IdleSocketCountInGroup("a"));
3650 EXPECT_EQ(0, pool_->NumActiveSocketsInGroup("a"));
3651 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("b"));
3652 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("b"));
3653 EXPECT_EQ(1, pool_->IdleSocketCountInGroup("b"));
3654 EXPECT_EQ(0, pool_->NumActiveSocketsInGroup("b"));
3659 pool_->EnableConnectBackupJobs();
3665 pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
3666 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3667 EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
3668 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3679 EXPECT_FALSE(pool_->HasGroup("a"));
3684 pool_->EnableConnectBackupJobs();
3688 pool_->RequestSockets("a", ¶ms_, 1, BoundNetLog());
3689 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3690 EXPECT_EQ(1, pool_->NumUnassignedConnectJobsInGroup("a"));
3691 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3702 pool_.get(),
3705 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3706 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3707 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3708 EXPECT_EQ(0, pool_->NumActiveSocketsInGroup("a"));
3713 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
3714 EXPECT_EQ(0, pool_->NumUnassignedConnectJobsInGroup("a"));
3715 EXPECT_EQ(0, pool_->IdleSocketCountInGroup("a"));
3716 EXPECT_EQ(1, pool_->NumActiveSocketsInGroup("a"));
3723 : pool_(pool),
3727 pool_->AddLayeredPool(this);
3731 pool_->RemoveLayeredPool(this);
3761 TestClientSocketPool* const pool_;
3773 MockLayeredPool mock_layered_pool(pool_.get(), "foo");
3774 EXPECT_EQ(OK, mock_layered_pool.RequestSocket(pool_.get()));
3777 EXPECT_FALSE(pool_->CloseOneIdleConnectionInLayeredPool());
3784 MockLayeredPool mock_layered_pool(pool_.get(), "foo");
3785 EXPECT_EQ(OK, mock_layered_pool.RequestSocket(pool_.get()));
3789 EXPECT_TRUE(pool_->CloseOneIdleConnectionInLayeredPool());
3798 MockLayeredPool mock_layered_pool(pool_.get(), "foo");
3799 EXPECT_EQ(OK, mock_layered_pool.RequestSocket(pool_.get()));
3809 pool_.get(),
3832 pool_.get(),
3835 MockLayeredPool mock_layered_pool(pool_.get(), "group2");
3836 EXPECT_EQ(OK, mock_layered_pool.RequestSocket(pool_.get()));
3846 pool_.get(),
3869 pool_.get(),
3872 MockLayeredPool mock_layered_pool(pool_.get(), "group2");
3873 EXPECT_EQ(OK, mock_layered_pool.RequestSocket(pool_.get()));
3886 pool_.get(),
3902 pool_.get(),
3934 pool_.get(),
3937 MockLayeredPool mock_layered_pool(pool_.get(), "group2");
3938 EXPECT_EQ(OK, mock_layered_pool.RequestSocket(pool_.get()));
3951 pool_.get(),
3966 pool_.get(),
3981 MockLayeredPool mock_layered_pool1(pool_.get(), "foo");
3982 EXPECT_EQ(OK, mock_layered_pool1.RequestSocket(pool_.get()));
3986 MockLayeredPool mock_layered_pool2(pool_.get(), "bar");
3987 EXPECT_EQ(OK, mock_layered_pool2.RequestSocketWithoutLimits(pool_.get()));
3997 pool_.get(),
4013 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
4019 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
4023 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a"));
4040 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
4045 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
4049 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a"));
4066 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
4072 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a"));
4075 EXPECT_EQ(1, pool_->NumConnectJobsInGroup("a"));
4091 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
4096 EXPECT_EQ(0, pool_->NumConnectJobsInGroup("a"));
4100 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a"));
4105 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a"));
4145 EXPECT_EQ(6, pool_->NumConnectJobsInGroup("a"));
4147 EXPECT_EQ(6, pool_->NumConnectJobsInGroup("a"));
4149 ASSERT_EQ(5, pool_->NumConnectJobsInGroup("a"));