Index: net/http/http_network_transaction_spdy2_unittest.cc |
diff --git a/net/http/http_network_transaction_spdy2_unittest.cc b/net/http/http_network_transaction_spdy2_unittest.cc |
index c6e00524575471786235bb48ca15c287aabd15eb..54f1a43bd746bb3452d94e0e2cb8b10e2bf57c5a 100644 |
--- a/net/http/http_network_transaction_spdy2_unittest.cc |
+++ b/net/http/http_network_transaction_spdy2_unittest.cc |
@@ -325,7 +325,7 @@ class HttpNetworkTransactionSpdy2Test : public PlatformTest { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
// Can't use ASSERT_* inside helper functions like this, so |
// return an error. |
- if (response == NULL || response->headers == NULL) { |
+ if (response == NULL || response->headers.get() == NULL) { |
out.rv = ERR_UNEXPECTED; |
return out; |
} |
@@ -873,7 +873,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, TwoIdenticalLocationHeaders) { |
EXPECT_EQ(OK, callback.WaitForResult()); |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
- ASSERT_TRUE(response != NULL && response->headers != NULL); |
+ ASSERT_TRUE(response != NULL && response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 302 Redirect", response->headers->GetStatusLine()); |
std::string url; |
EXPECT_TRUE(response->headers->IsRedirect(&url)); |
@@ -937,7 +937,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, Head) { |
ASSERT_TRUE(response != NULL); |
// Check that the headers got parsed. |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ(1234, response->headers->GetContentLength()); |
EXPECT_EQ("HTTP/1.1 404 Not Found", response->headers->GetStatusLine()); |
@@ -980,7 +980,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ReuseConnection) { |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
@@ -993,7 +993,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ReuseConnection) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -1038,7 +1038,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, Ignores100) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -1080,7 +1080,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, Ignores1xx) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -1203,7 +1203,7 @@ void HttpNetworkTransactionSpdy2Test::KeepAliveConnectionResendRequestTest( |
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); |
@@ -1224,7 +1224,7 @@ void HttpNetworkTransactionSpdy2Test::KeepAliveConnectionResendRequestTest( |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -1314,7 +1314,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, KeepAliveEarlyClose) { |
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"), |
@@ -1335,11 +1335,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, KeepAliveEarlyClose) { |
EXPECT_EQ(OK, rv); |
scoped_refptr<IOBufferWithSize> io_buf(new IOBufferWithSize(100)); |
- rv = trans->Read(io_buf, io_buf->size(), callback.callback()); |
+ rv = trans->Read(io_buf.get(), io_buf->size(), callback.callback()); |
if (rv == ERR_IO_PENDING) |
rv = callback.WaitForResult(); |
EXPECT_EQ(5, rv); |
- rv = trans->Read(io_buf, io_buf->size(), callback.callback()); |
+ rv = trans->Read(io_buf.get(), io_buf->size(), callback.callback()); |
EXPECT_EQ(ERR_CONTENT_LENGTH_MISMATCH, rv); |
trans.reset(); |
@@ -1355,7 +1355,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, KeepAliveEarlyClose2) { |
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"), |
@@ -1375,7 +1375,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, KeepAliveEarlyClose2) { |
EXPECT_EQ(OK, rv); |
scoped_refptr<IOBufferWithSize> io_buf(new IOBufferWithSize(100)); |
- rv = trans->Read(io_buf, io_buf->size(), callback.callback()); |
+ rv = trans->Read(io_buf.get(), io_buf->size(), callback.callback()); |
if (rv == ERR_IO_PENDING) |
rv = callback.WaitForResult(); |
EXPECT_EQ(ERR_CONTENT_LENGTH_MISMATCH, rv); |
@@ -1434,7 +1434,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, KeepAliveAfterUnreadBody) { |
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); |
@@ -1455,7 +1455,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, KeepAliveAfterUnreadBody) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
response_lines[i] = response->headers->GetStatusLine(); |
// We intentionally don't read the response bodies. |
@@ -1479,14 +1479,14 @@ TEST_F(HttpNetworkTransactionSpdy2Test, KeepAliveAfterUnreadBody) { |
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); |
rv = callback.WaitForResult(); |
EXPECT_EQ(OK, rv); |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
rv = ReadTransaction(trans.get(), &response_data); |
@@ -1687,7 +1687,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthKeepAlive) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -1776,7 +1776,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthKeepAliveNoBody) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -1860,7 +1860,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthKeepAliveLargeBody) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -1946,7 +1946,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthKeepAliveImpatientServer) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2031,7 +2031,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthProxyNoKeepAlive) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2050,7 +2050,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthProxyNoKeepAlive) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_FALSE(response->headers == NULL); |
+ ASSERT_FALSE(response->headers.get() == NULL); |
EXPECT_EQ(407, response->headers->response_code()); |
EXPECT_TRUE(HttpVersion(1, 1) == response->headers->GetHttpVersion()); |
EXPECT_TRUE(CheckBasicProxyAuth(response->auth_challenge.get())); |
@@ -2105,7 +2105,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthProxyKeepAlive) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Since we have proxy, should try to establish tunnel. |
MockWrite data_writes1[] = { |
@@ -2161,7 +2161,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthProxyKeepAlive) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_FALSE(response->headers == NULL); |
+ ASSERT_FALSE(response->headers.get() == NULL); |
EXPECT_TRUE(response->headers->IsKeepAlive()); |
EXPECT_EQ(407, response->headers->response_code()); |
EXPECT_EQ(10, response->headers->GetContentLength()); |
@@ -2180,7 +2180,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthProxyKeepAlive) { |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_FALSE(response->headers == NULL); |
+ ASSERT_FALSE(response->headers.get() == NULL); |
EXPECT_TRUE(response->headers->IsKeepAlive()); |
EXPECT_EQ(407, response->headers->response_code()); |
EXPECT_EQ(10, response->headers->GetContentLength()); |
@@ -2206,7 +2206,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthProxyCancelTunnel) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Since we have proxy, should try to establish tunnel. |
MockWrite data_writes[] = { |
@@ -2338,7 +2338,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2410,7 +2410,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpProxyLoadTimingNoPacTwoRequests) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans1( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans1->Start(&request1, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2420,7 +2420,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpProxyLoadTimingNoPacTwoRequests) { |
const HttpResponseInfo* response1 = trans1->GetResponseInfo(); |
ASSERT_TRUE(response1 != NULL); |
- ASSERT_TRUE(response1->headers != NULL); |
+ ASSERT_TRUE(response1->headers.get() != NULL); |
EXPECT_EQ(1, response1->headers->GetContentLength()); |
LoadTimingInfo load_timing_info1; |
@@ -2431,7 +2431,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpProxyLoadTimingNoPacTwoRequests) { |
TestCompletionCallback callback2; |
scoped_ptr<HttpTransaction> trans2( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans2->Start(&request2, callback2.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2441,7 +2441,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpProxyLoadTimingNoPacTwoRequests) { |
const HttpResponseInfo* response2 = trans2->GetResponseInfo(); |
ASSERT_TRUE(response2 != NULL); |
- ASSERT_TRUE(response2->headers != NULL); |
+ ASSERT_TRUE(response2->headers.get() != NULL); |
EXPECT_EQ(2, response2->headers->GetContentLength()); |
LoadTimingInfo load_timing_info2; |
@@ -2508,7 +2508,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpProxyLoadTimingWithPacTwoRequests) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans1( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans1->Start(&request1, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2518,7 +2518,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpProxyLoadTimingWithPacTwoRequests) { |
const HttpResponseInfo* response1 = trans1->GetResponseInfo(); |
ASSERT_TRUE(response1 != NULL); |
- ASSERT_TRUE(response1->headers != NULL); |
+ ASSERT_TRUE(response1->headers.get() != NULL); |
EXPECT_EQ(1, response1->headers->GetContentLength()); |
LoadTimingInfo load_timing_info1; |
@@ -2530,7 +2530,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpProxyLoadTimingWithPacTwoRequests) { |
TestCompletionCallback callback2; |
scoped_ptr<HttpTransaction> trans2( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans2->Start(&request2, callback2.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2540,7 +2540,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpProxyLoadTimingWithPacTwoRequests) { |
const HttpResponseInfo* response2 = trans2->GetResponseInfo(); |
ASSERT_TRUE(response2 != NULL); |
- ASSERT_TRUE(response2->headers != NULL); |
+ ASSERT_TRUE(response2->headers.get() != NULL); |
EXPECT_EQ(2, response2->headers->GetContentLength()); |
LoadTimingInfo load_timing_info2; |
@@ -2589,7 +2589,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxyGet) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2654,7 +2654,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyGet) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2669,7 +2669,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyGet) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -2745,7 +2745,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyGetWithProxyAuth) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -2756,7 +2756,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyGetWithProxyAuth) { |
const HttpResponseInfo* const response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ(407, response->headers->response_code()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(CheckBasicProxyAuth(response->auth_challenge.get())); |
@@ -2773,7 +2773,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyGetWithProxyAuth) { |
const HttpResponseInfo* const response_restart = trans->GetResponseInfo(); |
ASSERT_TRUE(response_restart != NULL); |
- ASSERT_TRUE(response_restart->headers != NULL); |
+ ASSERT_TRUE(response_restart->headers.get() != NULL); |
EXPECT_EQ(200, response_restart->headers->response_code()); |
// The password prompt info should not be set. |
EXPECT_TRUE(response_restart->auth_challenge.get() == NULL); |
@@ -2794,7 +2794,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyConnectHttps) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// CONNECT to www.google.com:443 via SPDY |
scoped_ptr<SpdyFrame> connect(spdy_util_.ConstructSpdyConnect(NULL, 0, 1)); |
@@ -2856,7 +2856,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyConnectHttps) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -2879,7 +2879,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyConnectSpdy) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// CONNECT to www.google.com:443 via SPDY |
scoped_ptr<SpdyFrame> connect(spdy_util_.ConstructSpdyConnect(NULL, 0, 1)); |
@@ -2940,7 +2940,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyConnectSpdy) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -2963,7 +2963,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxySpdyConnectFailure) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// CONNECT to www.google.com:443 via SPDY |
scoped_ptr<SpdyFrame> connect(spdy_util_.ConstructSpdyConnect(NULL, 0, 1)); |
@@ -3115,7 +3115,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
TestCompletionCallback callback; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request1, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
// The first connect and request, each of their responses, and the body. |
@@ -3130,15 +3130,15 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(256)); |
- EXPECT_EQ(1, trans->Read(buf, 256, callback.callback())); |
+ EXPECT_EQ(1, trans->Read(buf.get(), 256, callback.callback())); |
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); |
@@ -3157,7 +3157,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
// separate stream. |
EXPECT_NE(load_timing_info.socket_log_id, load_timing_info2.socket_log_id); |
- EXPECT_EQ(2, trans2->Read(buf, 256, callback.callback())); |
+ EXPECT_EQ(2, trans2->Read(buf.get(), 256, callback.callback())); |
} |
// Test load timing in the case of two HTTPS (non-SPDY) requests through a SPDY |
@@ -3244,7 +3244,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
TestCompletionCallback callback; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request1, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
// The first connect and request, each of their responses, and the body. |
@@ -3259,16 +3259,16 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(256)); |
- EXPECT_EQ(1, trans->Read(buf, 256, callback.callback())); |
+ EXPECT_EQ(1, trans->Read(buf.get(), 256, callback.callback())); |
trans.reset(); |
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); |
@@ -3285,7 +3285,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
// The requests should have the same ID. |
EXPECT_EQ(load_timing_info.socket_log_id, load_timing_info2.socket_log_id); |
- EXPECT_EQ(2, trans2->Read(buf, 256, callback.callback())); |
+ EXPECT_EQ(2, trans2->Read(buf.get(), 256, callback.callback())); |
} |
// Test load timing in the case of of two HTTP requests through a SPDY HTTPS |
@@ -3363,7 +3363,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
TestCompletionCallback callback; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request1, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
spdy_data.RunFor(2); |
@@ -3378,19 +3378,19 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(256)); |
- EXPECT_EQ(ERR_IO_PENDING, trans->Read(buf, 256, callback.callback())); |
+ EXPECT_EQ(ERR_IO_PENDING, trans->Read(buf.get(), 256, callback.callback())); |
spdy_data.RunFor(1); |
EXPECT_EQ(1, callback.WaitForResult()); |
// Delete the first request, so the second one can reuse the socket. |
trans.reset(); |
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); |
@@ -3405,7 +3405,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
// The requests should have the same ID. |
EXPECT_EQ(load_timing_info.socket_log_id, load_timing_info2.socket_log_id); |
- EXPECT_EQ(ERR_IO_PENDING, trans2->Read(buf, 256, callback.callback())); |
+ EXPECT_EQ(ERR_IO_PENDING, trans2->Read(buf.get(), 256, callback.callback())); |
spdy_data.RunFor(1); |
EXPECT_EQ(2, callback.WaitForResult()); |
} |
@@ -3463,7 +3463,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxyAuthRetry) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -3478,7 +3478,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HttpsProxyAuthRetry) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_FALSE(response->headers == NULL); |
+ ASSERT_FALSE(response->headers.get() == NULL); |
EXPECT_EQ(407, response->headers->response_code()); |
EXPECT_TRUE(HttpVersion(1, 1) == response->headers->GetHttpVersion()); |
EXPECT_TRUE(CheckBasicProxyAuth(response->auth_challenge.get())); |
@@ -3542,7 +3542,7 @@ void HttpNetworkTransactionSpdy2Test::ConnectStatusHelperWithExpectedStatus( |
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); |
@@ -3938,7 +3938,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, NTLMAuth1) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -4118,7 +4118,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, NTLMAuth2) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -4235,7 +4235,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Since we have proxy, should try to establish tunnel. |
MockWrite data_writes1[] = { |
@@ -4274,11 +4274,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
// We now check to make sure the TCPClientSocket was not added back to |
// the pool. |
- EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); |
trans.reset(); |
base::MessageLoop::current()->RunUntilIdle(); |
// Make sure that the socket didn't get recycled after calling the destructor. |
- EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); |
} |
// Make sure that we recycle a socket after reading all of the response body. |
@@ -4291,7 +4291,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSocket) { |
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[] = { |
// A part of the response body is received with the response headers. |
@@ -4317,11 +4317,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSocket) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
std::string status_line = response->headers->GetStatusLine(); |
EXPECT_EQ("HTTP/1.1 200 OK", status_line); |
- EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); |
std::string response_data; |
rv = ReadTransaction(trans.get(), &response_data); |
@@ -4333,7 +4333,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSocket) { |
base::MessageLoop::current()->RunUntilIdle(); |
// We now check to make sure the socket was added back to the pool. |
- EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session.get())); |
} |
// Make sure that we recycle a SSL socket after reading all of the response |
@@ -4368,7 +4368,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSSLSocket) { |
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()); |
@@ -4377,10 +4377,10 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSSLSocket) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
- EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); |
std::string response_data; |
rv = ReadTransaction(trans.get(), &response_data); |
@@ -4392,7 +4392,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSSLSocket) { |
base::MessageLoop::current()->RunUntilIdle(); |
// We now check to make sure the socket was added back to the pool. |
- EXPECT_EQ(1, GetIdleSocketCountInSSLSocketPool(session)); |
+ EXPECT_EQ(1, GetIdleSocketCountInSSLSocketPool(session.get())); |
} |
// Grab a SSL socket, use it, and put it back into the pool. Then, reuse it |
@@ -4436,7 +4436,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleDeadSSLSocket) { |
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()); |
@@ -4445,10 +4445,10 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleDeadSSLSocket) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
- EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); |
std::string response_data; |
rv = ReadTransaction(trans.get(), &response_data); |
@@ -4460,11 +4460,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleDeadSSLSocket) { |
base::MessageLoop::current()->RunUntilIdle(); |
// We now check to make sure the socket was added back to the pool. |
- EXPECT_EQ(1, GetIdleSocketCountInSSLSocketPool(session)); |
+ EXPECT_EQ(1, GetIdleSocketCountInSSLSocketPool(session.get())); |
// Now start the second transaction, which should reuse the previous socket. |
- trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
@@ -4473,10 +4473,10 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleDeadSSLSocket) { |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
- EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); |
rv = ReadTransaction(trans.get(), &response_data); |
EXPECT_EQ(OK, rv); |
@@ -4487,7 +4487,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleDeadSSLSocket) { |
base::MessageLoop::current()->RunUntilIdle(); |
// We now check to make sure the socket was added back to the pool. |
- EXPECT_EQ(1, GetIdleSocketCountInSSLSocketPool(session)); |
+ EXPECT_EQ(1, GetIdleSocketCountInSSLSocketPool(session.get())); |
} |
// Make sure that we recycle a socket after a zero-length response. |
@@ -4504,7 +4504,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSocketAfterZeroContentLength) { |
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 204 No Content\r\n" |
@@ -4528,11 +4528,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSocketAfterZeroContentLength) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
std::string status_line = response->headers->GetStatusLine(); |
EXPECT_EQ("HTTP/1.1 204 No Content", status_line); |
- EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(0, GetIdleSocketCountInTransportSocketPool(session.get())); |
std::string response_data; |
rv = ReadTransaction(trans.get(), &response_data); |
@@ -4544,7 +4544,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, RecycleSocketAfterZeroContentLength) { |
base::MessageLoop::current()->RunUntilIdle(); |
// We now check to make sure the socket was added back to the pool. |
- EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session)); |
+ EXPECT_EQ(1, GetIdleSocketCountInTransportSocketPool(session.get())); |
} |
TEST_F(HttpNetworkTransactionSpdy2Test, ResendRequestOnWriteBodyError) { |
@@ -4613,7 +4613,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ResendRequestOnWriteBodyError) { |
for (int i = 0; i < 2; ++i) { |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
@@ -4626,7 +4626,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ResendRequestOnWriteBodyError) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -4836,7 +4836,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthCacheAndPreauth) { |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET /x/y/z HTTP/1.1\r\n" |
@@ -4912,7 +4912,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthCacheAndPreauth) { |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET /x/y/a/b HTTP/1.1\r\n" |
@@ -4996,7 +4996,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthCacheAndPreauth) { |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET /x/y/z2 HTTP/1.1\r\n" |
@@ -5044,7 +5044,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthCacheAndPreauth) { |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET /x/1 HTTP/1.1\r\n" |
@@ -5114,7 +5114,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthCacheAndPreauth) { |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET /p/q/t HTTP/1.1\r\n" |
@@ -5226,7 +5226,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DigestPreAuthNonceCount) { |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET /x/y/z HTTP/1.1\r\n" |
@@ -5305,7 +5305,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DigestPreAuthNonceCount) { |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
MockWrite data_writes1[] = { |
MockWrite("GET /x/y/a/b HTTP/1.1\r\n" |
@@ -5368,7 +5368,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ResetStateForRestart) { |
scoped_refptr<HttpResponseHeaders> headers(new HttpResponseHeaders(temp)); |
request.extra_headers.SetHeader("Foo", "1"); |
request.extra_headers.SetHeader("bar", "23"); |
- EXPECT_TRUE(response->vary_data.Init(request, *headers)); |
+ EXPECT_TRUE(response->vary_data.Init(request, *headers.get())); |
} |
// Cause the above state to be reset. |
@@ -5918,7 +5918,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthSpdyProxy) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -5937,7 +5937,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, BasicAuthSpdyProxy) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_FALSE(response->headers == NULL); |
+ ASSERT_FALSE(response->headers.get() == NULL); |
EXPECT_EQ(407, response->headers->response_code()); |
EXPECT_TRUE(HttpVersion(1, 1) == response->headers->GetHttpVersion()); |
EXPECT_TRUE(response->auth_challenge.get() != NULL); |
@@ -6039,7 +6039,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CrossOriginProxyPush) { |
session_deps_.socket_factory->AddSSLSocketDataProvider(&proxy); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start(&request, callback.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -6049,9 +6049,8 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CrossOriginProxyPush) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
scoped_ptr<HttpTransaction> push_trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
- rv = push_trans->Start(&push_request, |
- callback.callback(), log.bound()); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
+ rv = push_trans->Start(&push_request, callback.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
rv = callback.WaitForResult(); |
@@ -6075,7 +6074,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CrossOriginProxyPush) { |
CONNECT_TIMING_HAS_CONNECT_TIMES_ONLY); |
// Verify the pushed stream. |
- EXPECT_TRUE(push_response->headers != NULL); |
+ EXPECT_TRUE(push_response->headers.get() != NULL); |
EXPECT_EQ(200, push_response->headers->response_code()); |
rv = ReadTransaction(push_trans.get(), &response_data); |
@@ -6154,7 +6153,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CrossOriginProxyPushCorrectness) { |
session_deps_.socket_factory->AddSSLSocketDataProvider(&proxy); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start(&request, callback.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -7014,7 +7013,7 @@ int GroupNameTransactionHelper( |
request.load_flags = 0; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
@@ -7216,7 +7215,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, GroupNameForSOCKSConnections) { |
peer.SetClientSocketPoolManager(mock_pool_manager); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
EXPECT_EQ(ERR_IO_PENDING, |
GroupNameTransactionHelper(tests[i].url, session)); |
@@ -7383,7 +7382,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ConnectionClosedAfterStartOfHeaders) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -7445,7 +7444,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DrainResetOK) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -7535,7 +7534,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, LargeContentLengthThenClose) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -7585,7 +7584,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UploadFileSmallerThanLength) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -7647,7 +7646,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UploadUnreadableFile) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine()); |
file_util::Delete(temp_file, false); |
@@ -7716,7 +7715,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UnreadableUploadFileAfterAuthRestart) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 401 Unauthorized", response->headers->GetStatusLine()); |
EXPECT_TRUE(CheckBasicServerAuth(response->auth_challenge.get())); |
@@ -7734,7 +7733,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UnreadableUploadFileAfterAuthRestart) { |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- EXPECT_TRUE(response->headers != NULL); |
+ EXPECT_TRUE(response->headers.get() != NULL); |
EXPECT_TRUE(response->auth_challenge.get() == NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
@@ -7918,7 +7917,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HonorAlternateProtocolHeader) { |
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); |
@@ -7933,7 +7932,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, HonorAlternateProtocolHeader) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_FALSE(response->was_fetched_via_spdy); |
EXPECT_FALSE(response->was_npn_negotiated); |
@@ -7988,7 +7987,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
NPN_SPDY_2); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
@@ -7997,7 +7996,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -8050,7 +8049,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
NPN_SPDY_2); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start( |
@@ -8101,7 +8100,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
NPN_SPDY_3); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
EXPECT_EQ(ERR_IO_PENDING, trans->Start( |
@@ -8149,7 +8148,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
NPN_SPDY_2); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start( |
@@ -8198,7 +8197,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
NPN_SPDY_2); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start( |
@@ -8246,7 +8245,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
NPN_SPDY_2); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start( |
@@ -8290,7 +8289,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
NPN_SPDY_2); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
@@ -8303,7 +8302,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -8366,7 +8365,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseAlternateProtocolForNpnSpdy) { |
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); |
@@ -8374,14 +8373,14 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseAlternateProtocolForNpnSpdy) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); |
EXPECT_EQ("hello world", response_data); |
- trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -8389,7 +8388,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseAlternateProtocolForNpnSpdy) { |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -8465,7 +8464,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, AlternateProtocolWithSpdyLateBinding) { |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
TestCompletionCallback callback1; |
- HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get()); |
int rv = trans1.Start(&request, callback1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -8473,7 +8472,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, AlternateProtocolWithSpdyLateBinding) { |
const HttpResponseInfo* response = trans1.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -8481,12 +8480,12 @@ TEST_F(HttpNetworkTransactionSpdy2Test, AlternateProtocolWithSpdyLateBinding) { |
EXPECT_EQ("hello world", response_data); |
TestCompletionCallback callback2; |
- HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get()); |
rv = trans2.Start(&request, callback2.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
TestCompletionCallback callback3; |
- HttpNetworkTransaction trans3(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans3(DEFAULT_PRIORITY, session.get()); |
rv = trans3.Start(&request, callback3.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -8495,7 +8494,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, AlternateProtocolWithSpdyLateBinding) { |
response = trans2.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -8504,7 +8503,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, AlternateProtocolWithSpdyLateBinding) { |
response = trans3.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -8552,7 +8551,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, StallAlternateProtocolForNpnSpdy) { |
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); |
@@ -8560,14 +8559,14 @@ TEST_F(HttpNetworkTransactionSpdy2Test, StallAlternateProtocolForNpnSpdy) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); |
EXPECT_EQ("hello world", response_data); |
- trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -8575,7 +8574,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, StallAlternateProtocolForNpnSpdy) { |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_FALSE(response->was_fetched_via_spdy); |
EXPECT_FALSE(response->was_npn_negotiated); |
@@ -8702,7 +8701,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
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); |
@@ -8710,7 +8709,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_FALSE(response->was_fetched_via_spdy); |
EXPECT_FALSE(response->was_npn_negotiated); |
@@ -8719,7 +8718,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); |
EXPECT_EQ("hello world", response_data); |
- trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -8727,7 +8726,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -8794,7 +8793,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
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); |
@@ -8802,7 +8801,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -8848,7 +8847,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
EXPECT_EQ(OK, spdy_session->InitializeWithSocket(ssl_connection.release(), |
true, OK)); |
- trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -8856,7 +8855,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -9325,7 +9324,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, MultiRoundAuth) { |
session_peer.SetClientSocketPoolManager(mock_pool_manager); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
const MockWrite kGet( |
@@ -9395,7 +9394,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, MultiRoundAuth) { |
// It should not be able to grab the TCP socket that trans has already |
// claimed. |
scoped_ptr<HttpTransaction> trans_compete( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback_compete; |
rv = trans_compete->Start( |
&request, callback_compete.callback(), BoundNetLog()); |
@@ -9440,11 +9439,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, MultiRoundAuth) { |
// Read the body since the fourth round was successful. This will also |
// release the socket back to the pool. |
scoped_refptr<IOBufferWithSize> io_buf(new IOBufferWithSize(50)); |
- rv = trans->Read(io_buf, io_buf->size(), callback.callback()); |
+ rv = trans->Read(io_buf.get(), io_buf->size(), callback.callback()); |
if (rv == ERR_IO_PENDING) |
rv = callback.WaitForResult(); |
EXPECT_EQ(3, rv); |
- rv = trans->Read(io_buf, io_buf->size(), callback.callback()); |
+ rv = trans->Read(io_buf.get(), io_buf->size(), callback.callback()); |
EXPECT_EQ(0, rv); |
// There are still 0 idle sockets, since the trans_compete transaction |
// will be handed it immediately after trans releases it to the group. |
@@ -9454,11 +9453,11 @@ TEST_F(HttpNetworkTransactionSpdy2Test, MultiRoundAuth) { |
// read the body. |
rv = callback_compete.WaitForResult(); |
EXPECT_EQ(OK, rv); |
- rv = trans_compete->Read(io_buf, io_buf->size(), callback.callback()); |
+ rv = trans_compete->Read(io_buf.get(), io_buf->size(), callback.callback()); |
if (rv == ERR_IO_PENDING) |
rv = callback.WaitForResult(); |
EXPECT_EQ(3, rv); |
- rv = trans_compete->Read(io_buf, io_buf->size(), callback.callback()); |
+ rv = trans_compete->Read(io_buf.get(), io_buf->size(), callback.callback()); |
EXPECT_EQ(0, rv); |
// Finally, the socket is released to the group. |
@@ -9504,7 +9503,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, NpnWithHttpOverSSL) { |
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()); |
@@ -9513,7 +9512,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, NpnWithHttpOverSSL) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -9558,7 +9557,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, SpdyPostNPNServerHangup) { |
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); |
@@ -9688,7 +9687,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, SpdyAlternateProtocolThroughProxy) { |
// First round should work and provide the Alternate-Protocol state. |
TestCompletionCallback callback_1; |
scoped_ptr<HttpTransaction> trans_1( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans_1->Start(&request, callback_1.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
EXPECT_EQ(OK, callback_1.WaitForResult()); |
@@ -9696,7 +9695,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, SpdyAlternateProtocolThroughProxy) { |
// Second round should attempt a tunnel connect and get an auth challenge. |
TestCompletionCallback callback_2; |
scoped_ptr<HttpTransaction> trans_2( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans_2->Start(&request, callback_2.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
EXPECT_EQ(OK, callback_2.WaitForResult()); |
@@ -9794,7 +9793,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ProxyGet) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -9858,7 +9857,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ProxyTunnelGet) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -9928,7 +9927,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ProxyTunnelGetHangup) { |
TestCompletionCallback callback1; |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request, callback1.callback(), log.bound()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -10005,7 +10004,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, PreconnectWithExistingSpdySession) { |
request.motivation = HttpRequestInfo::PRECONNECT_MOTIVATED; |
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); |
@@ -10032,7 +10031,7 @@ void HttpNetworkTransactionSpdy2Test::CheckErrorIsPassedBack( |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
TestCompletionCallback callback; |
int rv = trans->Start(&request_info, callback.callback(), net::BoundNetLog()); |
@@ -10126,7 +10125,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Begin the SSL handshake with the peer. This consumes ssl_data1. |
TestCompletionCallback callback; |
@@ -10247,7 +10246,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Begin the initial SSL handshake. |
TestCompletionCallback callback; |
@@ -10340,7 +10339,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ClientAuthCertCache_Proxy_Fail) { |
session_deps_.socket_factory->ResetNextMockIndexes(); |
scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
scoped_ptr<HttpNetworkTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
// Begin the SSL handshake with the proxy. |
TestCompletionCallback callback; |
@@ -10441,7 +10440,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, MAYBE_UseIPConnectionPooling) { |
request1.method = "GET"; |
request1.url = GURL("https://www.google.com/"); |
request1.load_flags = 0; |
- HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get()); |
int rv = trans1.Start(&request1, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -10449,7 +10448,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, MAYBE_UseIPConnectionPooling) { |
const HttpResponseInfo* response = trans1.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -10471,7 +10470,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, MAYBE_UseIPConnectionPooling) { |
request2.method = "GET"; |
request2.url = GURL("https://www.gmail.com/"); |
request2.load_flags = 0; |
- HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get()); |
rv = trans2.Start(&request2, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -10479,7 +10478,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, MAYBE_UseIPConnectionPooling) { |
response = trans2.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -10537,7 +10536,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseIPConnectionPoolingAfterResolution) { |
request1.method = "GET"; |
request1.url = GURL("https://www.google.com/"); |
request1.load_flags = 0; |
- HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get()); |
int rv = trans1.Start(&request1, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -10545,7 +10544,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseIPConnectionPoolingAfterResolution) { |
const HttpResponseInfo* response = trans1.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -10556,7 +10555,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseIPConnectionPoolingAfterResolution) { |
request2.method = "GET"; |
request2.url = GURL("https://www.gmail.com/"); |
request2.load_flags = 0; |
- HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get()); |
rv = trans2.Start(&request2, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -10564,7 +10563,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseIPConnectionPoolingAfterResolution) { |
response = trans2.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -10673,7 +10672,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
request1.method = "GET"; |
request1.url = GURL("https://www.google.com/"); |
request1.load_flags = 0; |
- HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans1(DEFAULT_PRIORITY, session.get()); |
int rv = trans1.Start(&request1, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -10681,7 +10680,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
const HttpResponseInfo* response = trans1.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
std::string response_data; |
@@ -10701,7 +10700,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
request2.method = "GET"; |
request2.url = GURL("https://www.gmail.com/"); |
request2.load_flags = 0; |
- HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session); |
+ HttpNetworkTransaction trans2(DEFAULT_PRIORITY, session.get()); |
rv = trans2.Start(&request2, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -10709,7 +10708,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, |
response = trans2.GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -10822,7 +10821,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DoNotUseSpdySessionForHttp) { |
request1.method = "GET"; |
request1.url = GURL(https_url); |
request1.load_flags = 0; |
- HttpNetworkTransaction trans1(LOWEST, session); |
+ HttpNetworkTransaction trans1(LOWEST, session.get()); |
TestCompletionCallback callback1; |
EXPECT_EQ(ERR_IO_PENDING, |
trans1.Start(&request1, callback1.callback(), BoundNetLog())); |
@@ -10836,7 +10835,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DoNotUseSpdySessionForHttp) { |
request2.method = "GET"; |
request2.url = GURL(http_url); |
request2.load_flags = 0; |
- HttpNetworkTransaction trans2(MEDIUM, session); |
+ HttpNetworkTransaction trans2(MEDIUM, session.get()); |
TestCompletionCallback callback2; |
EXPECT_EQ(ERR_IO_PENDING, |
trans2.Start(&request2, callback2.callback(), BoundNetLog())); |
@@ -10915,7 +10914,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DoNotUseSpdySessionForHttpOverTunnel) { |
request1.method = "GET"; |
request1.url = GURL(https_url); |
request1.load_flags = 0; |
- HttpNetworkTransaction trans1(LOWEST, session); |
+ HttpNetworkTransaction trans1(LOWEST, session.get()); |
TestCompletionCallback callback1; |
EXPECT_EQ(ERR_IO_PENDING, |
trans1.Start(&request1, callback1.callback(), BoundNetLog())); |
@@ -10935,7 +10934,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DoNotUseSpdySessionForHttpOverTunnel) { |
request2.method = "GET"; |
request2.url = GURL(http_url); |
request2.load_flags = 0; |
- HttpNetworkTransaction trans2(MEDIUM, session); |
+ HttpNetworkTransaction trans2(MEDIUM, session.get()); |
TestCompletionCallback callback2; |
EXPECT_EQ(ERR_IO_PENDING, |
trans2.Start(&request2, callback2.callback(), BoundNetLog())); |
@@ -10998,7 +10997,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseSpdySessionForHttpWhenForced) { |
request1.method = "GET"; |
request1.url = GURL(https_url); |
request1.load_flags = 0; |
- HttpNetworkTransaction trans1(LOWEST, session); |
+ HttpNetworkTransaction trans1(LOWEST, session.get()); |
TestCompletionCallback callback1; |
EXPECT_EQ(ERR_IO_PENDING, |
trans1.Start(&request1, callback1.callback(), BoundNetLog())); |
@@ -11012,7 +11011,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, UseSpdySessionForHttpWhenForced) { |
request2.method = "GET"; |
request2.url = GURL(http_url); |
request2.load_flags = 0; |
- HttpNetworkTransaction trans2(MEDIUM, session); |
+ HttpNetworkTransaction trans2(MEDIUM, session.get()); |
TestCompletionCallback callback2; |
EXPECT_EQ(ERR_IO_PENDING, |
trans2.Start(&request2, callback2.callback(), BoundNetLog())); |
@@ -11130,7 +11129,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DoNotUseSpdySessionIfCertDoesNotMatch) { |
request1.method = "GET"; |
request1.url = GURL(url1); |
request1.load_flags = 0; |
- HttpNetworkTransaction trans1(LOWEST, session); |
+ HttpNetworkTransaction trans1(LOWEST, session.get()); |
TestCompletionCallback callback1; |
ASSERT_EQ(ERR_IO_PENDING, |
trans1.Start(&request1, callback1.callback(), BoundNetLog())); |
@@ -11145,7 +11144,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, DoNotUseSpdySessionIfCertDoesNotMatch) { |
request2.method = "GET"; |
request2.url = GURL(url2); |
request2.load_flags = 0; |
- HttpNetworkTransaction trans2(MEDIUM, session); |
+ HttpNetworkTransaction trans2(MEDIUM, session.get()); |
TestCompletionCallback callback2; |
EXPECT_EQ(ERR_IO_PENDING, |
trans2.Start(&request2, callback2.callback(), BoundNetLog())); |
@@ -11211,7 +11210,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ErrorSocketNotConnected) { |
request1.method = "GET"; |
request1.url = GURL(https_url); |
request1.load_flags = 0; |
- HttpNetworkTransaction trans1(MEDIUM, session); |
+ HttpNetworkTransaction trans1(MEDIUM, session.get()); |
TestCompletionCallback callback1; |
EXPECT_EQ(ERR_IO_PENDING, |
trans1.Start(&request1, callback1.callback(), BoundNetLog())); |
@@ -11223,7 +11222,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, ErrorSocketNotConnected) { |
request2.method = "GET"; |
request2.url = GURL(https_url); |
request2.load_flags = 0; |
- HttpNetworkTransaction trans2(MEDIUM, session); |
+ HttpNetworkTransaction trans2(MEDIUM, session.get()); |
TestCompletionCallback callback2; |
EXPECT_EQ(ERR_IO_PENDING, |
trans2.Start(&request2, callback2.callback(), BoundNetLog())); |
@@ -11320,7 +11319,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CloseIdleSpdySessionToOpenNewOne) { |
request1.url = GURL("https://www.a.com/"); |
request1.load_flags = 0; |
scoped_ptr<HttpNetworkTransaction> trans( |
- new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
int rv = trans->Start(&request1, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -11328,7 +11327,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CloseIdleSpdySessionToOpenNewOne) { |
const HttpResponseInfo* response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -11349,7 +11348,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CloseIdleSpdySessionToOpenNewOne) { |
request2.method = "GET"; |
request2.url = GURL("https://www.b.com/"); |
request2.load_flags = 0; |
- trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans->Start(&request2, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -11357,7 +11356,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CloseIdleSpdySessionToOpenNewOne) { |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_TRUE(response->was_fetched_via_spdy); |
EXPECT_TRUE(response->was_npn_negotiated); |
@@ -11377,7 +11376,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CloseIdleSpdySessionToOpenNewOne) { |
request3.method = "GET"; |
request3.url = GURL("http://www.a.com/"); |
request3.load_flags = 0; |
- trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session)); |
+ trans.reset(new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
rv = trans->Start(&request3, callback.callback(), BoundNetLog()); |
EXPECT_EQ(ERR_IO_PENDING, rv); |
@@ -11385,7 +11384,7 @@ TEST_F(HttpNetworkTransactionSpdy2Test, CloseIdleSpdySessionToOpenNewOne) { |
response = trans->GetResponseInfo(); |
ASSERT_TRUE(response != NULL); |
- ASSERT_TRUE(response->headers != NULL); |
+ ASSERT_TRUE(response->headers.get() != NULL); |
EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
EXPECT_FALSE(response->was_fetched_via_spdy); |
EXPECT_FALSE(response->was_npn_negotiated); |