| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 if (test_params.ssl_type == HTTP_SPDY_VIA_ALT_SVC) { | 98 if (test_params.ssl_type == HTTP_SPDY_VIA_ALT_SVC) { |
| 99 base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1); | 99 base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1); |
| 100 session_deps->http_server_properties.SetAlternativeService( | 100 session_deps->http_server_properties.SetAlternativeService( |
| 101 HostPortPair("www.example.org", 80), | 101 HostPortPair("www.example.org", 80), |
| 102 AlternativeService(AlternateProtocolFromNextProto(test_params.protocol), | 102 AlternativeService(AlternateProtocolFromNextProto(test_params.protocol), |
| 103 "www.example.org", 443), | 103 "www.example.org", 443), |
| 104 1.0, expiration); | 104 1.0, expiration); |
| 105 } | 105 } |
| 106 } | 106 } |
| 107 | 107 |
| 108 SpdySessionDependencies* CreateSpdySessionDependencies( | 108 scoped_ptr<SpdySessionDependencies> CreateSpdySessionDependencies( |
| 109 SpdyNetworkTransactionTestParams test_params) { | 109 SpdyNetworkTransactionTestParams test_params) { |
| 110 SpdySessionDependencies* session_deps = | 110 scoped_ptr<SpdySessionDependencies> session_deps( |
| 111 new SpdySessionDependencies(test_params.protocol); | 111 new SpdySessionDependencies(test_params.protocol)); |
| 112 UpdateSpdySessionDependencies(test_params, session_deps); | 112 UpdateSpdySessionDependencies(test_params, session_deps.get()); |
| 113 return session_deps; | 113 return session_deps; |
| 114 } | 114 } |
| 115 | 115 |
| 116 SpdySessionDependencies* CreateSpdySessionDependencies( | 116 scoped_ptr<SpdySessionDependencies> CreateSpdySessionDependencies( |
| 117 SpdyNetworkTransactionTestParams test_params, | 117 SpdyNetworkTransactionTestParams test_params, |
| 118 ProxyService* proxy_service) { | 118 scoped_ptr<ProxyService> proxy_service) { |
| 119 SpdySessionDependencies* session_deps = | 119 scoped_ptr<SpdySessionDependencies> session_deps( |
| 120 new SpdySessionDependencies(test_params.protocol, proxy_service); | 120 new SpdySessionDependencies(test_params.protocol, proxy_service.Pass())); |
| 121 UpdateSpdySessionDependencies(test_params, session_deps); | 121 UpdateSpdySessionDependencies(test_params, session_deps.get()); |
| 122 return session_deps; | 122 return session_deps; |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace | 125 } // namespace |
| 126 | 126 |
| 127 class SpdyNetworkTransactionTest | 127 class SpdyNetworkTransactionTest |
| 128 : public ::testing::TestWithParam<SpdyNetworkTransactionTestParams> { | 128 : public ::testing::TestWithParam<SpdyNetworkTransactionTestParams> { |
| 129 protected: | 129 protected: |
| 130 SpdyNetworkTransactionTest() : spdy_util_(GetParam().protocol) { | 130 SpdyNetworkTransactionTest() : spdy_util_(GetParam().protocol) { |
| 131 spdy_util_.set_default_url(GURL(GetDefaultUrl())); | 131 spdy_util_.set_default_url(GURL(GetDefaultUrl())); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 148 struct TransactionHelperResult { | 148 struct TransactionHelperResult { |
| 149 int rv; | 149 int rv; |
| 150 std::string status_line; | 150 std::string status_line; |
| 151 std::string response_data; | 151 std::string response_data; |
| 152 HttpResponseInfo response_info; | 152 HttpResponseInfo response_info; |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 // A helper class that handles all the initial npn/ssl setup. | 155 // A helper class that handles all the initial npn/ssl setup. |
| 156 class NormalSpdyTransactionHelper { | 156 class NormalSpdyTransactionHelper { |
| 157 public: | 157 public: |
| 158 NormalSpdyTransactionHelper(const HttpRequestInfo& request, | 158 NormalSpdyTransactionHelper( |
| 159 RequestPriority priority, | 159 const HttpRequestInfo& request, |
| 160 const BoundNetLog& log, | 160 RequestPriority priority, |
| 161 SpdyNetworkTransactionTestParams test_params, | 161 const BoundNetLog& log, |
| 162 SpdySessionDependencies* session_deps) | 162 SpdyNetworkTransactionTestParams test_params, |
| 163 scoped_ptr<SpdySessionDependencies> session_deps) |
| 163 : request_(request), | 164 : request_(request), |
| 164 priority_(priority), | 165 priority_(priority), |
| 165 session_deps_(session_deps == NULL | 166 session_deps_(session_deps.get() == NULL |
| 166 ? CreateSpdySessionDependencies(test_params) | 167 ? CreateSpdySessionDependencies(test_params) |
| 167 : session_deps), | 168 : session_deps.Pass()), |
| 168 session_( | 169 session_( |
| 169 SpdySessionDependencies::SpdyCreateSession(session_deps_.get())), | 170 SpdySessionDependencies::SpdyCreateSession(session_deps_.get())), |
| 170 log_(log), | 171 log_(log), |
| 171 test_params_(test_params), | 172 test_params_(test_params), |
| 172 port_(443), | 173 port_(443), |
| 173 deterministic_(false), | 174 deterministic_(false), |
| 174 spdy_enabled_(true) {} | 175 spdy_enabled_(true) {} |
| 175 | 176 |
| 176 ~NormalSpdyTransactionHelper() { | 177 ~NormalSpdyTransactionHelper() { |
| 177 // Any test which doesn't close the socket by sending it an EOF will | 178 // Any test which doesn't close the socket by sending it an EOF will |
| (...skipping 13 matching lines...) Expand all Loading... |
| 191 deterministic_ = true; | 192 deterministic_ = true; |
| 192 } | 193 } |
| 193 | 194 |
| 194 void SetSpdyDisabled() { | 195 void SetSpdyDisabled() { |
| 195 spdy_enabled_ = false; | 196 spdy_enabled_ = false; |
| 196 port_ = test_params_.ssl_type == HTTP_SPDY_VIA_ALT_SVC ? 80 : 443; | 197 port_ = test_params_.ssl_type == HTTP_SPDY_VIA_ALT_SVC ? 80 : 443; |
| 197 } | 198 } |
| 198 | 199 |
| 199 void RunPreTestSetup() { | 200 void RunPreTestSetup() { |
| 200 if (!session_deps_.get()) | 201 if (!session_deps_.get()) |
| 201 session_deps_.reset(CreateSpdySessionDependencies(test_params_)); | 202 session_deps_ = CreateSpdySessionDependencies(test_params_); |
| 202 if (!session_.get()) { | 203 if (!session_.get()) { |
| 203 session_ = SpdySessionDependencies::SpdyCreateSession( | 204 session_ = SpdySessionDependencies::SpdyCreateSession( |
| 204 session_deps_.get()); | 205 session_deps_.get()); |
| 205 } | 206 } |
| 206 | 207 |
| 207 // We're now ready to use SSL-npn SPDY. | 208 // We're now ready to use SSL-npn SPDY. |
| 208 trans_.reset(new HttpNetworkTransaction(priority_, session_.get())); | 209 trans_.reset(new HttpNetworkTransaction(priority_, session_.get())); |
| 209 } | 210 } |
| 210 | 211 |
| 211 // Start the transaction, read some data, finish. | 212 // Start the transaction, read some data, finish. |
| (...skipping 3318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3530 MockWrite writes[] = {CreateMockWrite(*compressed, 0), | 3531 MockWrite writes[] = {CreateMockWrite(*compressed, 0), |
| 3531 CreateMockWrite(*goaway, 2)}; | 3532 CreateMockWrite(*goaway, 2)}; |
| 3532 | 3533 |
| 3533 scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); | 3534 scoped_ptr<SpdyFrame> resp(spdy_util_.ConstructSpdyGetSynReply(NULL, 0, 1)); |
| 3534 scoped_ptr<SpdyFrame> body(spdy_util_.ConstructSpdyBodyFrame(1, true)); | 3535 scoped_ptr<SpdyFrame> body(spdy_util_.ConstructSpdyBodyFrame(1, true)); |
| 3535 MockRead reads[] = { | 3536 MockRead reads[] = { |
| 3536 CreateMockRead(*resp, 1), | 3537 CreateMockRead(*resp, 1), |
| 3537 }; | 3538 }; |
| 3538 | 3539 |
| 3539 SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes)); | 3540 SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes)); |
| 3540 SpdySessionDependencies* session_deps = | 3541 scoped_ptr<SpdySessionDependencies> session_deps = |
| 3541 CreateSpdySessionDependencies(GetParam()); | 3542 CreateSpdySessionDependencies(GetParam()); |
| 3542 session_deps->enable_compression = true; | 3543 session_deps->enable_compression = true; |
| 3543 NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY, | 3544 NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY, |
| 3544 BoundNetLog(), GetParam(), session_deps); | 3545 BoundNetLog(), GetParam(), |
| 3546 session_deps.Pass()); |
| 3545 helper.RunToCompletion(&data); | 3547 helper.RunToCompletion(&data); |
| 3546 TransactionHelperResult out = helper.output(); | 3548 TransactionHelperResult out = helper.output(); |
| 3547 EXPECT_EQ(ERR_SPDY_COMPRESSION_ERROR, out.rv); | 3549 EXPECT_EQ(ERR_SPDY_COMPRESSION_ERROR, out.rv); |
| 3548 data.Reset(); | 3550 data.Reset(); |
| 3549 } | 3551 } |
| 3550 | 3552 |
| 3551 // Test that the NetLog contains good data for a simple GET request. | 3553 // Test that the NetLog contains good data for a simple GET request. |
| 3552 TEST_P(SpdyNetworkTransactionTest, NetLog) { | 3554 TEST_P(SpdyNetworkTransactionTest, NetLog) { |
| 3553 static const char* const kExtraHeaders[] = { | 3555 static const char* const kExtraHeaders[] = { |
| 3554 "user-agent", "Chrome", | 3556 "user-agent", "Chrome", |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4393 return; | 4395 return; |
| 4394 | 4396 |
| 4395 HttpRequestInfo request; | 4397 HttpRequestInfo request; |
| 4396 request.method = "GET"; | 4398 request.method = "GET"; |
| 4397 request.url = GURL("https://www.example.org/"); | 4399 request.url = GURL("https://www.example.org/"); |
| 4398 scoped_ptr<SpdySessionDependencies> session_deps( | 4400 scoped_ptr<SpdySessionDependencies> session_deps( |
| 4399 CreateSpdySessionDependencies(GetParam())); | 4401 CreateSpdySessionDependencies(GetParam())); |
| 4400 // Do not force SPDY so that second socket can negotiate HTTP/1.1. | 4402 // Do not force SPDY so that second socket can negotiate HTTP/1.1. |
| 4401 session_deps->next_protos = SpdyNextProtos(); | 4403 session_deps->next_protos = SpdyNextProtos(); |
| 4402 NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(), | 4404 NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(), |
| 4403 GetParam(), session_deps.release()); | 4405 GetParam(), session_deps.Pass()); |
| 4404 | 4406 |
| 4405 // First socket: HTTP/2 request rejected with HTTP_1_1_REQUIRED. | 4407 // First socket: HTTP/2 request rejected with HTTP_1_1_REQUIRED. |
| 4406 const char* url = request.url.spec().c_str(); | 4408 const char* url = request.url.spec().c_str(); |
| 4407 scoped_ptr<SpdyHeaderBlock> headers(spdy_util_.ConstructGetHeaderBlock(url)); | 4409 scoped_ptr<SpdyHeaderBlock> headers(spdy_util_.ConstructGetHeaderBlock(url)); |
| 4408 scoped_ptr<SpdyFrame> req( | 4410 scoped_ptr<SpdyFrame> req( |
| 4409 spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, false, true)); | 4411 spdy_util_.ConstructSpdySyn(1, *headers, LOWEST, false, true)); |
| 4410 MockWrite writes0[] = {CreateMockWrite(*req, 0)}; | 4412 MockWrite writes0[] = {CreateMockWrite(*req, 0)}; |
| 4411 scoped_ptr<SpdyFrame> go_away(spdy_util_.ConstructSpdyGoAway( | 4413 scoped_ptr<SpdyFrame> go_away(spdy_util_.ConstructSpdyGoAway( |
| 4412 0, GOAWAY_HTTP_1_1_REQUIRED, "Try again using HTTP/1.1 please.")); | 4414 0, GOAWAY_HTTP_1_1_REQUIRED, "Try again using HTTP/1.1 please.")); |
| 4413 MockRead reads0[] = {CreateMockRead(*go_away, 1)}; | 4415 MockRead reads0[] = {CreateMockRead(*go_away, 1)}; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4485 HttpRequestInfo request; | 4487 HttpRequestInfo request; |
| 4486 request.method = "GET"; | 4488 request.method = "GET"; |
| 4487 request.url = GURL("https://www.example.org/"); | 4489 request.url = GURL("https://www.example.org/"); |
| 4488 scoped_ptr<SpdySessionDependencies> session_deps( | 4490 scoped_ptr<SpdySessionDependencies> session_deps( |
| 4489 CreateSpdySessionDependencies( | 4491 CreateSpdySessionDependencies( |
| 4490 GetParam(), | 4492 GetParam(), |
| 4491 ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70"))); | 4493 ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70"))); |
| 4492 // Do not force SPDY so that second socket can negotiate HTTP/1.1. | 4494 // Do not force SPDY so that second socket can negotiate HTTP/1.1. |
| 4493 session_deps->next_protos = SpdyNextProtos(); | 4495 session_deps->next_protos = SpdyNextProtos(); |
| 4494 NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(), | 4496 NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(), |
| 4495 GetParam(), session_deps.release()); | 4497 GetParam(), session_deps.Pass()); |
| 4496 | 4498 |
| 4497 // First socket: HTTP/2 CONNECT rejected with HTTP_1_1_REQUIRED. | 4499 // First socket: HTTP/2 CONNECT rejected with HTTP_1_1_REQUIRED. |
| 4498 scoped_ptr<SpdyFrame> req(spdy_util_.ConstructSpdyConnect( | 4500 scoped_ptr<SpdyFrame> req(spdy_util_.ConstructSpdyConnect( |
| 4499 nullptr, 0, 1, LOWEST, HostPortPair("www.example.org", 443))); | 4501 nullptr, 0, 1, LOWEST, HostPortPair("www.example.org", 443))); |
| 4500 MockWrite writes0[] = {CreateMockWrite(*req, 0)}; | 4502 MockWrite writes0[] = {CreateMockWrite(*req, 0)}; |
| 4501 scoped_ptr<SpdyFrame> go_away(spdy_util_.ConstructSpdyGoAway( | 4503 scoped_ptr<SpdyFrame> go_away(spdy_util_.ConstructSpdyGoAway( |
| 4502 0, GOAWAY_HTTP_1_1_REQUIRED, "Try again using HTTP/1.1 please.")); | 4504 0, GOAWAY_HTTP_1_1_REQUIRED, "Try again using HTTP/1.1 please.")); |
| 4503 MockRead reads0[] = {CreateMockRead(*go_away, 1)}; | 4505 MockRead reads0[] = {CreateMockRead(*go_away, 1)}; |
| 4504 SequencedSocketData data0(reads0, arraysize(reads0), writes0, | 4506 SequencedSocketData data0(reads0, arraysize(reads0), writes0, |
| 4505 arraysize(writes0)); | 4507 arraysize(writes0)); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4573 EXPECT_EQ(70, response->socket_address.port()); | 4575 EXPECT_EQ(70, response->socket_address.port()); |
| 4574 std::string response_data; | 4576 std::string response_data; |
| 4575 ASSERT_EQ(OK, ReadTransaction(helper.trans(), &response_data)); | 4577 ASSERT_EQ(OK, ReadTransaction(helper.trans(), &response_data)); |
| 4576 EXPECT_EQ("hello", response_data); | 4578 EXPECT_EQ("hello", response_data); |
| 4577 } | 4579 } |
| 4578 | 4580 |
| 4579 // Test to make sure we can correctly connect through a proxy. | 4581 // Test to make sure we can correctly connect through a proxy. |
| 4580 TEST_P(SpdyNetworkTransactionTest, ProxyConnect) { | 4582 TEST_P(SpdyNetworkTransactionTest, ProxyConnect) { |
| 4581 NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY, | 4583 NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY, |
| 4582 BoundNetLog(), GetParam(), NULL); | 4584 BoundNetLog(), GetParam(), NULL); |
| 4583 helper.session_deps().reset(CreateSpdySessionDependencies( | 4585 helper.session_deps() = CreateSpdySessionDependencies( |
| 4584 GetParam(), | 4586 GetParam(), ProxyService::CreateFixedFromPacResult("PROXY myproxy:70")); |
| 4585 ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"))); | |
| 4586 helper.SetSession(make_scoped_refptr( | 4587 helper.SetSession(make_scoped_refptr( |
| 4587 SpdySessionDependencies::SpdyCreateSession(helper.session_deps().get()))); | 4588 SpdySessionDependencies::SpdyCreateSession(helper.session_deps().get()))); |
| 4588 helper.RunPreTestSetup(); | 4589 helper.RunPreTestSetup(); |
| 4589 HttpNetworkTransaction* trans = helper.trans(); | 4590 HttpNetworkTransaction* trans = helper.trans(); |
| 4590 | 4591 |
| 4591 const char kConnect443[] = { | 4592 const char kConnect443[] = { |
| 4592 "CONNECT www.example.org:443 HTTP/1.1\r\n" | 4593 "CONNECT www.example.org:443 HTTP/1.1\r\n" |
| 4593 "Host: www.example.org\r\n" | 4594 "Host: www.example.org\r\n" |
| 4594 "Proxy-Connection: keep-alive\r\n\r\n"}; | 4595 "Proxy-Connection: keep-alive\r\n\r\n"}; |
| 4595 const char kHTTP200[] = {"HTTP/1.1 200 OK\r\n\r\n"}; | 4596 const char kHTTP200[] = {"HTTP/1.1 200 OK\r\n\r\n"}; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4638 TEST_P(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) { | 4639 TEST_P(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) { |
| 4639 // When setting up the first transaction, we store the SpdySessionPool so that | 4640 // When setting up the first transaction, we store the SpdySessionPool so that |
| 4640 // we can use the same pool in the second transaction. | 4641 // we can use the same pool in the second transaction. |
| 4641 NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY, | 4642 NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY, |
| 4642 BoundNetLog(), GetParam(), NULL); | 4643 BoundNetLog(), GetParam(), NULL); |
| 4643 | 4644 |
| 4644 // Use a proxy service which returns a proxy fallback list from DIRECT to | 4645 // Use a proxy service which returns a proxy fallback list from DIRECT to |
| 4645 // myproxy:70. For this test there will be no fallback, so it is equivalent | 4646 // myproxy:70. For this test there will be no fallback, so it is equivalent |
| 4646 // to simply DIRECT. The reason for appending the second proxy is to verify | 4647 // to simply DIRECT. The reason for appending the second proxy is to verify |
| 4647 // that the session pool key used does is just "DIRECT". | 4648 // that the session pool key used does is just "DIRECT". |
| 4648 helper.session_deps().reset(CreateSpdySessionDependencies( | 4649 helper.session_deps() = CreateSpdySessionDependencies( |
| 4649 GetParam(), | 4650 GetParam(), |
| 4650 ProxyService::CreateFixedFromPacResult("DIRECT; PROXY myproxy:70"))); | 4651 ProxyService::CreateFixedFromPacResult("DIRECT; PROXY myproxy:70")); |
| 4651 helper.SetSession(make_scoped_refptr( | 4652 helper.SetSession(make_scoped_refptr( |
| 4652 SpdySessionDependencies::SpdyCreateSession(helper.session_deps().get()))); | 4653 SpdySessionDependencies::SpdyCreateSession(helper.session_deps().get()))); |
| 4653 | 4654 |
| 4654 SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool(); | 4655 SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool(); |
| 4655 helper.RunPreTestSetup(); | 4656 helper.RunPreTestSetup(); |
| 4656 | 4657 |
| 4657 // Construct and send a simple GET request. | 4658 // Construct and send a simple GET request. |
| 4658 scoped_ptr<SpdyFrame> req( | 4659 scoped_ptr<SpdyFrame> req( |
| 4659 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); | 4660 spdy_util_.ConstructSpdyGet(NULL, 0, false, 1, LOWEST, true)); |
| 4660 MockWrite writes[] = { | 4661 MockWrite writes[] = { |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5579 HttpRequestInfo request; | 5580 HttpRequestInfo request; |
| 5580 request.method = "GET"; | 5581 request.method = "GET"; |
| 5581 request.url = GURL(url_to_fetch); | 5582 request.url = GURL(url_to_fetch); |
| 5582 request.load_flags = 0; | 5583 request.load_flags = 0; |
| 5583 | 5584 |
| 5584 // Enable cross-origin push. Since we are not using a proxy, this should | 5585 // Enable cross-origin push. Since we are not using a proxy, this should |
| 5585 // not actually enable cross-origin SPDY push. | 5586 // not actually enable cross-origin SPDY push. |
| 5586 scoped_ptr<SpdySessionDependencies> session_deps( | 5587 scoped_ptr<SpdySessionDependencies> session_deps( |
| 5587 CreateSpdySessionDependencies(GetParam())); | 5588 CreateSpdySessionDependencies(GetParam())); |
| 5588 session_deps->trusted_spdy_proxy = "123.45.67.89:8080"; | 5589 session_deps->trusted_spdy_proxy = "123.45.67.89:8080"; |
| 5589 NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, | 5590 NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(), |
| 5590 BoundNetLog(), GetParam(), | 5591 GetParam(), session_deps.Pass()); |
| 5591 session_deps.release()); | |
| 5592 helper.RunPreTestSetup(); | 5592 helper.RunPreTestSetup(); |
| 5593 helper.AddData(&data); | 5593 helper.AddData(&data); |
| 5594 | 5594 |
| 5595 HttpNetworkTransaction* trans = helper.trans(); | 5595 HttpNetworkTransaction* trans = helper.trans(); |
| 5596 | 5596 |
| 5597 // Start the transaction with basic parameters. | 5597 // Start the transaction with basic parameters. |
| 5598 TestCompletionCallback callback; | 5598 TestCompletionCallback callback; |
| 5599 | 5599 |
| 5600 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); | 5600 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
| 5601 EXPECT_EQ(ERR_IO_PENDING, rv); | 5601 EXPECT_EQ(ERR_IO_PENDING, rv); |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6624 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6624 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6625 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6625 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 6626 new SSLSocketDataProvider(ASYNC, OK)); | 6626 new SSLSocketDataProvider(ASYNC, OK)); |
| 6627 // Set to TLS_RSA_WITH_NULL_MD5 | 6627 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6628 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6628 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6629 | 6629 |
| 6630 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6630 RunTLSUsageCheckTest(ssl_provider.Pass()); |
| 6631 } | 6631 } |
| 6632 | 6632 |
| 6633 } // namespace net | 6633 } // namespace net |
| OLD | NEW |