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 "net/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 ClientSocketPoolManager::set_max_sockets_per_pool( | 139 ClientSocketPoolManager::set_max_sockets_per_pool( |
140 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_pool_sockets_); | 140 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_pool_sockets_); |
141 ClientSocketPoolManager::set_max_sockets_per_group( | 141 ClientSocketPoolManager::set_max_sockets_per_group( |
142 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_group_sockets_); | 142 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_group_sockets_); |
143 } | 143 } |
144 | 144 |
145 void SetUp() override { | 145 void SetUp() override { |
146 g_time_delta = base::TimeDelta(); | 146 g_time_delta = base::TimeDelta(); |
147 g_time_now = base::TimeTicks::Now(); | 147 g_time_now = base::TimeTicks::Now(); |
148 session_deps_.net_log = log_.bound().net_log(); | 148 session_deps_.net_log = log_.bound().net_log(); |
| 149 session_deps_.enable_server_push_cancellation = true; |
149 } | 150 } |
150 | 151 |
151 void CreateNetworkSession() { | 152 void CreateNetworkSession() { |
152 DCHECK(!http_session_); | 153 DCHECK(!http_session_); |
153 DCHECK(!spdy_session_pool_); | 154 DCHECK(!spdy_session_pool_); |
154 http_session_ = | 155 http_session_ = |
155 SpdySessionDependencies::SpdyCreateSession(&session_deps_); | 156 SpdySessionDependencies::SpdyCreateSession(&session_deps_); |
156 std::unique_ptr<TestServerPushDelegate> test_push_delegate( | 157 std::unique_ptr<TestServerPushDelegate> test_push_delegate( |
157 new TestServerPushDelegate()); | 158 new TestServerPushDelegate()); |
158 test_push_delegate_ = test_push_delegate.get(); | 159 test_push_delegate_ = test_push_delegate.get(); |
(...skipping 5940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6099 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), | 6100 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), |
6100 "spdy_pooling.pem"); | 6101 "spdy_pooling.pem"); |
6101 ssl_info.is_issued_by_known_root = true; | 6102 ssl_info.is_issued_by_known_root = true; |
6102 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); | 6103 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); |
6103 | 6104 |
6104 EXPECT_TRUE(SpdySession::CanPool( | 6105 EXPECT_TRUE(SpdySession::CanPool( |
6105 &tss, ssl_info, "www.example.org", "mail.example.org")); | 6106 &tss, ssl_info, "www.example.org", "mail.example.org")); |
6106 } | 6107 } |
6107 | 6108 |
6108 } // namespace net | 6109 } // namespace net |
OLD | NEW |