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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 scoped_refptr<HttpNetworkSession> http_session_; | 174 scoped_refptr<HttpNetworkSession> http_session_; |
175 SpdySessionPool* spdy_session_pool_; | 175 SpdySessionPool* spdy_session_pool_; |
176 GURL test_url_; | 176 GURL test_url_; |
177 HostPortPair test_host_port_pair_; | 177 HostPortPair test_host_port_pair_; |
178 SpdySessionKey key_; | 178 SpdySessionKey key_; |
179 }; | 179 }; |
180 | 180 |
181 INSTANTIATE_TEST_CASE_P( | 181 INSTANTIATE_TEST_CASE_P( |
182 NextProto, | 182 NextProto, |
183 SpdySessionTest, | 183 SpdySessionTest, |
184 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15)); | 184 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15, kProtoSPDY4)); |
185 | 185 |
186 // Try to create a SPDY session that will fail during | 186 // Try to create a SPDY session that will fail during |
187 // initialization. Nothing should blow up. | 187 // initialization. Nothing should blow up. |
188 TEST_P(SpdySessionTest, InitialReadError) { | 188 TEST_P(SpdySessionTest, InitialReadError) { |
189 CreateDeterministicNetworkSession(); | 189 CreateDeterministicNetworkSession(); |
190 | 190 |
191 base::WeakPtr<SpdySession> session = TryCreateFakeSpdySessionExpectingFailure( | 191 base::WeakPtr<SpdySession> session = TryCreateFakeSpdySessionExpectingFailure( |
192 spdy_session_pool_, key_, ERR_CONNECTION_CLOSED); | 192 spdy_session_pool_, key_, ERR_CONNECTION_CLOSED); |
193 EXPECT_TRUE(session); | 193 EXPECT_TRUE(session); |
194 // Flush the read. | 194 // Flush the read. |
(...skipping 4928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5123 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), | 5123 ssl_info.cert = ImportCertFromFile(GetTestCertsDirectory(), |
5124 "spdy_pooling.pem"); | 5124 "spdy_pooling.pem"); |
5125 ssl_info.is_issued_by_known_root = true; | 5125 ssl_info.is_issued_by_known_root = true; |
5126 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); | 5126 ssl_info.public_key_hashes.push_back(test::GetTestHashValue(primary_pin)); |
5127 | 5127 |
5128 EXPECT_TRUE(SpdySession::CanPool( | 5128 EXPECT_TRUE(SpdySession::CanPool( |
5129 &tss, ssl_info, "www.example.org", "mail.example.org")); | 5129 &tss, ssl_info, "www.example.org", "mail.example.org")); |
5130 } | 5130 } |
5131 | 5131 |
5132 } // namespace net | 5132 } // namespace net |
OLD | NEW |