Index: net/http/http_network_transaction_unittest.cc |
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc |
index f56b6e25e36c292aca58b88ab8f35e4a49463a76..6a3efdd2c71fae66aa33e9ef6210f96890347611 100644 |
--- a/net/http/http_network_transaction_unittest.cc |
+++ b/net/http/http_network_transaction_unittest.cc |
@@ -303,7 +303,7 @@ class HttpNetworkTransactionTest |
session_deps_.net_log = log.bound().net_log(); |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
for (size_t i = 0; i < data_count; ++i) { |
session_deps_.socket_factory->AddSocketDataProvider(data[i]); |
@@ -638,7 +638,7 @@ bool CheckNTLMServerAuth(const AuthChallengeInfo* auth_challenge) { |
TEST_P(HttpNetworkTransactionTest, Basic) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
} |
TEST_P(HttpNetworkTransactionTest, SimpleGET) { |
@@ -956,7 +956,7 @@ TEST_P(HttpNetworkTransactionTest, TwoIdenticalLocationHeaders) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0); |
session_deps_.socket_factory->AddSocketDataProvider(&data); |
@@ -1001,7 +1001,7 @@ TEST_P(HttpNetworkTransactionTest, Head) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
BeforeProxyHeadersSentHandler proxy_headers_handler; |
trans->SetBeforeProxyHeadersSentCallback( |
base::Bind(&BeforeProxyHeadersSentHandler::OnBeforeProxyHeadersSent, |
@@ -1120,7 +1120,7 @@ TEST_P(HttpNetworkTransactionTest, Ignores100) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockRead data_reads[] = { |
MockRead("HTTP/1.0 100 Continue\r\n\r\n"), |
@@ -1162,7 +1162,7 @@ TEST_P(HttpNetworkTransactionTest, Ignores1xx) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockRead data_reads[] = { |
MockRead("HTTP/1.1 102 Unspecified status code\r\n\r\n" |
@@ -1201,7 +1201,7 @@ TEST_P(HttpNetworkTransactionTest, Incomplete100ThenEOF) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockRead data_reads[] = { |
MockRead(SYNCHRONOUS, "HTTP/1.0 100 Continue\r\n"), |
@@ -1232,8 +1232,7 @@ TEST_P(HttpNetworkTransactionTest, EmptyResponse) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
- |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockRead data_reads[] = { |
MockRead(ASYNC, 0), |
@@ -1548,7 +1547,7 @@ TEST_P(HttpNetworkTransactionTest, NonKeepAliveConnectionReset) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockRead data_reads[] = { |
MockRead(ASYNC, ERR_CONNECTION_RESET), |
@@ -1875,7 +1874,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuth) { |
session_deps_.net_log = &log; |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -1974,7 +1973,7 @@ TEST_P(HttpNetworkTransactionTest, DoNotSendAuth) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -2646,7 +2645,7 @@ TEST_P(HttpNetworkTransactionTest, UnexpectedProxyAuth) { |
// We are using a DIRECT connection (i.e. no proxy) for this session. |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -4197,7 +4196,7 @@ TEST_P(HttpNetworkTransactionTest, BasicAuthProxyThenServer) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET http://www.google.com/ HTTP/1.1\r\n" |
@@ -4658,7 +4657,7 @@ TEST_P(HttpNetworkTransactionTest, LargeHeadersNoBody) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Respond with 300 kb of headers (we should fail after 256 kb). |
std::string large_headers_string; |
@@ -5113,7 +5112,7 @@ TEST_P(HttpNetworkTransactionTest, AuthIdentityInURL) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// The password contains an escaped character -- for this test to pass it |
// will need to be unescaped by HttpNetworkTransaction. |
@@ -5194,7 +5193,7 @@ TEST_P(HttpNetworkTransactionTest, WrongAuthIdentityInURL) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -5302,7 +5301,7 @@ TEST_P(HttpNetworkTransactionTest, AuthIdentityInURLSuppressed) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -5893,7 +5892,7 @@ TEST_P(HttpNetworkTransactionTest, ResetStateForRestart) { |
// Create a transaction (the dependencies aren't important). |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpNetworkTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Setup some state (which we expect ResetStateForRestart() will clear). |
trans->read_buf_ = new IOBuffer(15); |
@@ -5940,7 +5939,7 @@ TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificate) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -6044,7 +6043,7 @@ TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificateViaProxy) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -6108,7 +6107,7 @@ TEST_P(HttpNetworkTransactionTest, HTTPSViaHttpsProxy) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -6166,7 +6165,7 @@ TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaHttpsProxy) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -6251,7 +6250,7 @@ TEST_P(HttpNetworkTransactionTest, RedirectOfHttpsConnectViaSpdyProxy) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -6303,7 +6302,7 @@ TEST_P(HttpNetworkTransactionTest, |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -6364,7 +6363,7 @@ TEST_P(HttpNetworkTransactionTest, |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -6778,7 +6777,7 @@ TEST_P(HttpNetworkTransactionTest, HTTPSBadCertificateViaHttpsProxy) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -6807,7 +6806,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_UserAgent) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -6847,7 +6846,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_UserAgentOverTunnel) { |
session_deps_.proxy_service.reset(ProxyService::CreateFixed("myproxy:70")); |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n" |
@@ -6886,7 +6885,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_Referer) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -6923,7 +6922,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_PostContentLengthZero) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |
@@ -6960,7 +6959,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_PutContentLengthZero) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("PUT / HTTP/1.1\r\n" |
@@ -6997,7 +6996,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_HeadContentLengthZero) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("HEAD / HTTP/1.1\r\n" |
@@ -7035,7 +7034,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_CacheControlNoCache) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -7075,7 +7074,7 @@ TEST_P(HttpNetworkTransactionTest, |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -7113,7 +7112,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_ExtraHeaders) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -7153,7 +7152,7 @@ TEST_P(HttpNetworkTransactionTest, BuildRequest_ExtraHeadersStripped) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -7198,7 +7197,7 @@ TEST_P(HttpNetworkTransactionTest, SOCKS4_HTTP_GET) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
char write_buffer[] = { 0x04, 0x01, 0x00, 0x50, 127, 0, 0, 1, 0 }; |
char read_buffer[] = { 0x00, 0x5A, 0x00, 0x00, 0, 0, 0, 0 }; |
@@ -7257,7 +7256,7 @@ TEST_P(HttpNetworkTransactionTest, SOCKS4_SSL_GET) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
unsigned char write_buffer[] = { 0x04, 0x01, 0x01, 0xBB, 127, 0, 0, 1, 0 }; |
unsigned char read_buffer[] = { 0x00, 0x5A, 0x00, 0x00, 0, 0, 0, 0 }; |
@@ -7321,7 +7320,7 @@ TEST_P(HttpNetworkTransactionTest, SOCKS4_HTTP_GET_no_PAC) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
char write_buffer[] = { 0x04, 0x01, 0x00, 0x50, 127, 0, 0, 1, 0 }; |
char read_buffer[] = { 0x00, 0x5A, 0x00, 0x00, 0, 0, 0, 0 }; |
@@ -7380,7 +7379,7 @@ TEST_P(HttpNetworkTransactionTest, SOCKS5_HTTP_GET) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 }; |
const char kSOCKS5GreetResponse[] = { 0x05, 0x00 }; |
@@ -7453,7 +7452,7 @@ TEST_P(HttpNetworkTransactionTest, SOCKS5_SSL_GET) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 }; |
const char kSOCKS5GreetResponse[] = { 0x05, 0x00 }; |
@@ -7784,7 +7783,7 @@ TEST_P(HttpNetworkTransactionTest, ReconsiderProxyAfterFailedConnection) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
@@ -7810,7 +7809,7 @@ void HttpNetworkTransactionTest::BypassHostCacheOnRefreshHelper( |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Warm up the host cache so it has an entry for "www.google.com". |
AddressList addrlist; |
@@ -7890,7 +7889,7 @@ TEST_P(HttpNetworkTransactionTest, RequestWriteError) { |
TestCompletionCallback callback; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -7918,7 +7917,7 @@ TEST_P(HttpNetworkTransactionTest, ConnectionClosedAfterStartOfHeaders) { |
TestCompletionCallback callback; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -8043,7 +8042,7 @@ TEST_P(HttpNetworkTransactionTest, HTTPSViaProxyWithExtraData) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -8060,7 +8059,7 @@ TEST_P(HttpNetworkTransactionTest, LargeContentLengthThenClose) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockRead data_reads[] = { |
MockRead("HTTP/1.0 200 OK\r\nContent-Length:6719476739\r\n\r\n"), |
@@ -8112,7 +8111,7 @@ TEST_P(HttpNetworkTransactionTest, UploadFileSmallerThanLength) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockRead data_reads[] = { |
MockRead("HTTP/1.0 200 OK\r\n\r\n"), |
@@ -8170,7 +8169,7 @@ TEST_P(HttpNetworkTransactionTest, UploadUnreadableFile) { |
// If we try to upload an unreadable file, the transaction should fail. |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
StaticSocketDataProvider data(NULL, 0, NULL, 0); |
session_deps_.socket_factory->AddSocketDataProvider(&data); |
@@ -8227,7 +8226,7 @@ TEST_P(HttpNetworkTransactionTest, CancelDuringInitRequestBody) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
StaticSocketDataProvider data; |
session_deps_.socket_factory->AddSocketDataProvider(&data); |
@@ -8331,7 +8330,7 @@ TEST_P(HttpNetworkTransactionTest, ChangeAuthRealms) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Issue the first request with Authorize headers. There should be a |
// password prompt for first_realm waiting to be filled in after the |
@@ -9702,7 +9701,7 @@ TEST_P(HttpNetworkTransactionTest, GenerateAuthToken) { |
request.load_flags = 0; |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
- HttpNetworkTransaction trans(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get()); |
for (int round = 0; round < test_config.num_auth_rounds; ++round) { |
const TestRound& read_write_round = test_config.rounds[round]; |
@@ -10261,7 +10260,7 @@ TEST_P(HttpNetworkTransactionTest, SimpleCancel) { |
session_deps_.host_resolver->set_synchronous_mode(true); |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0); |
data.set_connect_data(mock_connect); |
@@ -10305,7 +10304,7 @@ TEST_P(HttpNetworkTransactionTest, CancelAfterHeaders) { |
request.url = GURL("http://www.google.com/"); |
request.load_flags = 0; |
- HttpNetworkTransaction trans(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get()); |
TestCompletionCallback callback; |
int rv = trans.Start(&request, callback.callback(), BoundNetLog()); |
@@ -10324,7 +10323,7 @@ TEST_P(HttpNetworkTransactionTest, CancelAfterHeaders) { |
base::MessageLoop::current()->RunUntilIdle(); |
// Socket should now be idle, waiting to be reused. |
- EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session.get())); |
} |
// Test a basic GET request through a proxy. |
@@ -11649,7 +11648,7 @@ TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionIfCertDoesNotMatch) { |
base::FilePath certs_dir = GetTestCertsDirectory(); |
scoped_refptr<X509Certificate> server_cert( |
ImportCertFromFile(certs_dir, "ok_cert.pem")); |
- ASSERT_NE(static_cast<X509Certificate*>(NULL), server_cert); |
+ ASSERT_NE(static_cast<X509Certificate*>(NULL), server_cert.get()); |
SSLSocketDataProvider ssl1(ASYNC, OK); // to the proxy |
ssl1.SetNextProto(GetParam()); |
@@ -11955,7 +11954,7 @@ TEST_P(HttpNetworkTransactionTest, HttpSyncConnectError) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockConnect mock_connect(SYNCHRONOUS, ERR_CONNECTION_REFUSED); |
StaticSocketDataProvider data; |
@@ -11985,7 +11984,7 @@ TEST_P(HttpNetworkTransactionTest, HttpAsyncConnectError) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockConnect mock_connect(ASYNC, ERR_CONNECTION_REFUSED); |
StaticSocketDataProvider data; |
@@ -12015,7 +12014,7 @@ TEST_P(HttpNetworkTransactionTest, HttpSyncWriteError) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite(SYNCHRONOUS, ERR_CONNECTION_RESET), |
@@ -12051,7 +12050,7 @@ TEST_P(HttpNetworkTransactionTest, HttpAsyncWriteError) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite(ASYNC, ERR_CONNECTION_RESET), |
@@ -12087,7 +12086,7 @@ TEST_P(HttpNetworkTransactionTest, HttpSyncReadError) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -12125,7 +12124,7 @@ TEST_P(HttpNetworkTransactionTest, HttpAsyncReadError) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -12164,7 +12163,7 @@ TEST_P(HttpNetworkTransactionTest, GetFullRequestHeadersIncludesExtraHeader) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("GET / HTTP/1.1\r\n" |
@@ -12465,7 +12464,7 @@ TEST_P(HttpNetworkTransactionTest, SetStreamRequestPriorityOnStart) { |
FakeStreamFactory* fake_factory = new FakeStreamFactory(); |
peer.SetHttpStreamFactory(scoped_ptr<HttpStreamFactory>(fake_factory)); |
- HttpNetworkTransaction trans(LOW, session); |
+ HttpNetworkTransaction trans(LOW, session.get()); |
ASSERT_TRUE(fake_factory->last_stream_request() == NULL); |
@@ -12488,7 +12487,7 @@ TEST_P(HttpNetworkTransactionTest, SetStreamRequestPriority) { |
FakeStreamFactory* fake_factory = new FakeStreamFactory(); |
peer.SetHttpStreamFactory(scoped_ptr<HttpStreamFactory>(fake_factory)); |
- HttpNetworkTransaction trans(LOW, session); |
+ HttpNetworkTransaction trans(LOW, session.get()); |
HttpRequestInfo request; |
TestCompletionCallback callback; |
@@ -12513,7 +12512,7 @@ TEST_P(HttpNetworkTransactionTest, SetStreamPriority) { |
FakeStreamFactory* fake_factory = new FakeStreamFactory(); |
peer.SetHttpStreamFactory(scoped_ptr<HttpStreamFactory>(fake_factory)); |
- HttpNetworkTransaction trans(LOW, session); |
+ HttpNetworkTransaction trans(LOW, session.get()); |
HttpRequestInfo request; |
TestCompletionCallback callback; |
@@ -12544,7 +12543,7 @@ TEST_P(HttpNetworkTransactionTest, CreateWebSocketHandshakeStream) { |
peer.SetHttpStreamFactoryForWebSocket( |
scoped_ptr<HttpStreamFactory>(fake_factory)); |
- HttpNetworkTransaction trans(LOW, session); |
+ HttpNetworkTransaction trans(LOW, session.get()); |
trans.SetWebSocketHandshakeStreamCreateHelper( |
&websocket_stream_create_helper); |
@@ -12634,7 +12633,7 @@ TEST_P(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest) { |
ASSERT_EQ(ERR_IO_PENDING, |
http_trans->Start(&http_request, http_callback.callback(), |
BoundNetLog())); |
- EXPECT_TRUE(IsTransportSocketPoolStalled(session)); |
+ EXPECT_TRUE(IsTransportSocketPoolStalled(session.get())); |
// Wait for response from SSL request. |
ASSERT_EQ(OK, ssl_callback.WaitForResult()); |
@@ -12644,15 +12643,15 @@ TEST_P(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest) { |
// The SSL socket should automatically be closed, so the HTTP request can |
// start. |
- EXPECT_EQ(0, GetIdleSocketCountInSSLSocketPool(session)); |
- ASSERT_FALSE(IsTransportSocketPoolStalled(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInSSLSocketPool(session.get())); |
+ ASSERT_FALSE(IsTransportSocketPoolStalled(session.get())); |
// The HTTP request can now complete. |
ASSERT_EQ(OK, http_callback.WaitForResult()); |
ASSERT_EQ(OK, ReadTransaction(http_trans.get(), &response_data)); |
EXPECT_EQ("falafel", response_data); |
- EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session.get())); |
} |
// Tests that when a SSL connection is established but there's no corresponding |
@@ -12707,7 +12706,7 @@ TEST_P(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest2) { |
session->ssl_config_service()->GetSSLConfig(&ssl_config); |
http_stream_factory->PreconnectStreams(1, ssl_request, DEFAULT_PRIORITY, |
ssl_config, ssl_config); |
- EXPECT_EQ(0, GetIdleSocketCountInSSLSocketPool(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInSSLSocketPool(session.get())); |
// Start the HTTP request. Pool should stall. |
TestCompletionCallback http_callback; |
@@ -12716,7 +12715,7 @@ TEST_P(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest2) { |
ASSERT_EQ(ERR_IO_PENDING, |
http_trans->Start(&http_request, http_callback.callback(), |
BoundNetLog())); |
- EXPECT_TRUE(IsTransportSocketPoolStalled(session)); |
+ EXPECT_TRUE(IsTransportSocketPoolStalled(session.get())); |
// The SSL connection will automatically be closed once the connection is |
// established, to let the HTTP request start. |
@@ -12725,7 +12724,7 @@ TEST_P(HttpNetworkTransactionTest, CloseSSLSocketOnIdleForHttpRequest2) { |
ASSERT_EQ(OK, ReadTransaction(http_trans.get(), &response_data)); |
EXPECT_EQ("falafel", response_data); |
- EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session.get())); |
} |
TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterReset) { |
@@ -12741,7 +12740,7 @@ TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterReset) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Send headers successfully, but get an error while sending the body. |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |
@@ -12816,7 +12815,7 @@ TEST_P(HttpNetworkTransactionTest, |
request1.load_flags = 0; |
scoped_ptr<HttpTransaction> trans1( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans1->Start(&request1, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -12847,7 +12846,7 @@ TEST_P(HttpNetworkTransactionTest, |
request2.load_flags = 0; |
scoped_ptr<HttpTransaction> trans2( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans2->Start(&request2, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -12880,7 +12879,7 @@ TEST_P(HttpNetworkTransactionTest, |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Send headers successfully, but get an error while sending the body. |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |
@@ -12935,7 +12934,7 @@ TEST_P(HttpNetworkTransactionTest, ChunkedPostReadsErrorResponseAfterReset) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Send headers successfully, but get an error while sending the body. |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |
@@ -12994,7 +12993,7 @@ TEST_P(HttpNetworkTransactionTest, PostReadsErrorResponseAfterResetAnd100) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |
@@ -13047,7 +13046,7 @@ TEST_P(HttpNetworkTransactionTest, PostIgnoresNonErrorResponseAfterReset) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Send headers successfully, but get an error while sending the body. |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |
@@ -13092,7 +13091,7 @@ TEST_P(HttpNetworkTransactionTest, |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Send headers successfully, but get an error while sending the body. |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |
@@ -13138,7 +13137,7 @@ TEST_P(HttpNetworkTransactionTest, PostIgnoresHttp09ResponseAfterReset) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Send headers successfully, but get an error while sending the body. |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |
@@ -13181,7 +13180,7 @@ TEST_P(HttpNetworkTransactionTest, PostIgnoresPartial400HeadersAfterReset) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Send headers successfully, but get an error while sending the body. |
MockWrite data_writes[] = { |
MockWrite("POST / HTTP/1.1\r\n" |