Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(832)

Side by Side Diff: net/spdy/spdy_session_unittest.cc

Issue 987123002: Advertise HTTP/2 support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/spdy/spdy_session_pool_unittest.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_pool_unittest.cc ('k') | net/spdy/spdy_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698