| Index: net/spdy/spdy_test_util_common.cc
|
| diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
|
| index 22ff5f6f092679836856c3b3c40ee7b4981dfe64..66a6f8c3fdaede3222b5f7df21daf3fb727a61dc 100644
|
| --- a/net/spdy/spdy_test_util_common.cc
|
| +++ b/net/spdy/spdy_test_util_common.cc
|
| @@ -540,12 +540,15 @@
|
|
|
| EXPECT_EQ(OK, rv);
|
|
|
| - base::WeakPtr<SpdySession> spdy_session =
|
| + base::WeakPtr<SpdySession> spdy_session;
|
| + EXPECT_EQ(
|
| + expected_status,
|
| http_session->spdy_session_pool()->CreateAvailableSessionFromSocket(
|
| - key, connection.Pass(), net_log, OK, is_secure);
|
| - // Failure is reported asynchronously.
|
| - EXPECT_TRUE(spdy_session != NULL);
|
| - EXPECT_TRUE(HasSpdySession(http_session->spdy_session_pool(), key));
|
| + key, connection.Pass(), net_log, OK, &spdy_session,
|
| + is_secure));
|
| + EXPECT_EQ(expected_status == OK, spdy_session != NULL);
|
| + EXPECT_EQ(expected_status == OK,
|
| + HasSpdySession(http_session->spdy_session_pool(), key));
|
| return spdy_session;
|
| }
|
|
|
| @@ -559,14 +562,14 @@
|
| OK, false /* is_secure */);
|
| }
|
|
|
| -base::WeakPtr<SpdySession> TryCreateInsecureSpdySessionExpectingFailure(
|
| +void TryCreateInsecureSpdySessionExpectingFailure(
|
| const scoped_refptr<HttpNetworkSession>& http_session,
|
| const SpdySessionKey& key,
|
| Error expected_error,
|
| const BoundNetLog& net_log) {
|
| DCHECK_LT(expected_error, ERR_IO_PENDING);
|
| - return CreateSpdySessionHelper(http_session, key, net_log,
|
| - expected_error, false /* is_secure */);
|
| + CreateSpdySessionHelper(http_session, key, net_log,
|
| + expected_error, false /* is_secure */);
|
| }
|
|
|
| base::WeakPtr<SpdySession> CreateSecureSpdySession(
|
| @@ -640,15 +643,17 @@
|
| Error expected_status) {
|
| EXPECT_NE(expected_status, ERR_IO_PENDING);
|
| EXPECT_FALSE(HasSpdySession(pool, key));
|
| + base::WeakPtr<SpdySession> spdy_session;
|
| scoped_ptr<ClientSocketHandle> handle(new ClientSocketHandle());
|
| handle->SetSocket(scoped_ptr<StreamSocket>(new FakeSpdySessionClientSocket(
|
| expected_status == OK ? ERR_IO_PENDING : expected_status)));
|
| - base::WeakPtr<SpdySession> spdy_session =
|
| + EXPECT_EQ(
|
| + expected_status,
|
| pool->CreateAvailableSessionFromSocket(
|
| - key, handle.Pass(), BoundNetLog(), OK, true /* is_secure */);
|
| - // Failure is reported asynchronously.
|
| - EXPECT_TRUE(spdy_session != NULL);
|
| - EXPECT_TRUE(HasSpdySession(pool, key));
|
| + key, handle.Pass(), BoundNetLog(), OK, &spdy_session,
|
| + true /* is_secure */));
|
| + EXPECT_EQ(expected_status == OK, spdy_session != NULL);
|
| + EXPECT_EQ(expected_status == OK, HasSpdySession(pool, key));
|
| return spdy_session;
|
| }
|
|
|
| @@ -659,12 +664,11 @@
|
| return CreateFakeSpdySessionHelper(pool, key, OK);
|
| }
|
|
|
| -base::WeakPtr<SpdySession> TryCreateFakeSpdySessionExpectingFailure(
|
| - SpdySessionPool* pool,
|
| - const SpdySessionKey& key,
|
| - Error expected_error) {
|
| +void TryCreateFakeSpdySessionExpectingFailure(SpdySessionPool* pool,
|
| + const SpdySessionKey& key,
|
| + Error expected_error) {
|
| DCHECK_LT(expected_error, ERR_IO_PENDING);
|
| - return CreateFakeSpdySessionHelper(pool, key, expected_error);
|
| + CreateFakeSpdySessionHelper(pool, key, expected_error);
|
| }
|
|
|
| SpdySessionPoolPeer::SpdySessionPoolPeer(SpdySessionPool* pool) : pool_(pool) {
|
|
|