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 "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 virtual ~SpdySessionTest() { | 115 virtual ~SpdySessionTest() { |
116 // Important to restore the per-pool limit first, since the pool limit must | 116 // Important to restore the per-pool limit first, since the pool limit must |
117 // always be greater than group limit, and the tests reduce both limits. | 117 // always be greater than group limit, and the tests reduce both limits. |
118 ClientSocketPoolManager::set_max_sockets_per_pool( | 118 ClientSocketPoolManager::set_max_sockets_per_pool( |
119 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_pool_sockets_); | 119 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_pool_sockets_); |
120 ClientSocketPoolManager::set_max_sockets_per_group( | 120 ClientSocketPoolManager::set_max_sockets_per_group( |
121 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_group_sockets_); | 121 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_group_sockets_); |
122 } | 122 } |
123 | 123 |
124 virtual void SetUp() override { | 124 void SetUp() override { g_time_delta = base::TimeDelta(); } |
125 g_time_delta = base::TimeDelta(); | |
126 } | |
127 | 125 |
128 void CreateDeterministicNetworkSession() { | 126 void CreateDeterministicNetworkSession() { |
129 http_session_ = | 127 http_session_ = |
130 SpdySessionDependencies::SpdyCreateSessionDeterministic(&session_deps_); | 128 SpdySessionDependencies::SpdyCreateSessionDeterministic(&session_deps_); |
131 spdy_session_pool_ = http_session_->spdy_session_pool(); | 129 spdy_session_pool_ = http_session_->spdy_session_pool(); |
132 } | 130 } |
133 | 131 |
134 void CreateNetworkSession() { | 132 void CreateNetworkSession() { |
135 http_session_ = | 133 http_session_ = |
136 SpdySessionDependencies::SpdyCreateSession(&session_deps_); | 134 SpdySessionDependencies::SpdyCreateSession(&session_deps_); |
(...skipping 4998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5135 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), | 5133 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), |
5136 "spdy_pooling.pem"); | 5134 "spdy_pooling.pem"); |
5137 ssl_info.is_issued_by_known_root = true; | 5135 ssl_info.is_issued_by_known_root = true; |
5138 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); | 5136 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); |
5139 | 5137 |
5140 EXPECT_TRUE(SpdySession::CanPool( | 5138 EXPECT_TRUE(SpdySession::CanPool( |
5141 &tss, ssl_info, "www.example.org", "mail.example.org")); | 5139 &tss, ssl_info, "www.example.org", "mail.example.org")); |
5142 } | 5140 } |
5143 | 5141 |
5144 } // namespace net | 5142 } // namespace net |
OLD | NEW |