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

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

Issue 2692813002: Server push cancellation: add a finch trial parameter (Closed)
Patch Set: Spin the message loop to ensure the client receives the response Created 3 years, 8 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/quic/core/quic_session.cc ('k') | net/spdy/spdy_test_util_common.h » ('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 <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
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
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
OLDNEW
« no previous file with comments | « net/quic/core/quic_session.cc ('k') | net/spdy/spdy_test_util_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698