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

Side by Side Diff: net/http/http_network_transaction_unittest.cc

Issue 1779733003: Fix bug in net::RequestPriority -> HTTP/2 dependency conversion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make bi-directional stream unittests enable priority->dependency setting. Created 4 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/http/http_network_session.cc ('k') | net/http/http_proxy_client_socket_pool_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <limits> 10 #include <limits>
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 : public PlatformTest, 264 : public PlatformTest,
265 public ::testing::WithParamInterface<TestCase> { 265 public ::testing::WithParamInterface<TestCase> {
266 public: 266 public:
267 virtual ~HttpNetworkTransactionTest() { 267 virtual ~HttpNetworkTransactionTest() {
268 // Important to restore the per-pool limit first, since the pool limit must 268 // Important to restore the per-pool limit first, since the pool limit must
269 // always be greater than group limit, and the tests reduce both limits. 269 // always be greater than group limit, and the tests reduce both limits.
270 ClientSocketPoolManager::set_max_sockets_per_pool( 270 ClientSocketPoolManager::set_max_sockets_per_pool(
271 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_pool_sockets_); 271 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_pool_sockets_);
272 ClientSocketPoolManager::set_max_sockets_per_group( 272 ClientSocketPoolManager::set_max_sockets_per_group(
273 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_group_sockets_); 273 HttpNetworkSession::NORMAL_SOCKET_POOL, old_max_group_sockets_);
274 SpdySession::SetPriorityDependencyDefaultForTesting(false);
275 } 274 }
276 275
277 protected: 276 protected:
278 HttpNetworkTransactionTest() 277 HttpNetworkTransactionTest()
279 : spdy_util_(GetProtocol(), GetDependenciesFromPriority()), 278 : spdy_util_(GetProtocol(), GetDependenciesFromPriority()),
280 session_deps_(GetProtocol()), 279 session_deps_(GetProtocol()),
281 old_max_group_sockets_(ClientSocketPoolManager::max_sockets_per_group( 280 old_max_group_sockets_(ClientSocketPoolManager::max_sockets_per_group(
282 HttpNetworkSession::NORMAL_SOCKET_POOL)), 281 HttpNetworkSession::NORMAL_SOCKET_POOL)),
283 old_max_pool_sockets_(ClientSocketPoolManager::max_sockets_per_pool( 282 old_max_pool_sockets_(ClientSocketPoolManager::max_sockets_per_pool(
284 HttpNetworkSession::NORMAL_SOCKET_POOL)) { 283 HttpNetworkSession::NORMAL_SOCKET_POOL)) {
285 SpdySession::SetPriorityDependencyDefaultForTesting( 284 session_deps_.enable_priority_dependencies = GetDependenciesFromPriority();
286 GetDependenciesFromPriority());
287 } 285 }
288 286
289 struct SimpleGetHelperResult { 287 struct SimpleGetHelperResult {
290 int rv; 288 int rv;
291 std::string status_line; 289 std::string status_line;
292 std::string response_data; 290 std::string response_data;
293 int64_t total_received_bytes; 291 int64_t total_received_bytes;
294 int64_t total_sent_bytes; 292 int64_t total_sent_bytes;
295 LoadTimingInfo load_timing_info; 293 LoadTimingInfo load_timing_info;
296 ConnectionAttempts connection_attempts; 294 ConnectionAttempts connection_attempts;
(...skipping 15655 matching lines...) Expand 10 before | Expand all | Expand 10 after
15952 base::MessageLoop::current()->RunUntilIdle(); 15950 base::MessageLoop::current()->RunUntilIdle();
15953 15951
15954 EXPECT_TRUE(trans.GetResponseInfo()->was_fetched_via_spdy); 15952 EXPECT_TRUE(trans.GetResponseInfo()->was_fetched_via_spdy);
15955 HttpRequestHeaders headers; 15953 HttpRequestHeaders headers;
15956 ASSERT_TRUE(trans.GetFullRequestHeaders(&headers)); 15954 ASSERT_TRUE(trans.GetFullRequestHeaders(&headers));
15957 EXPECT_TRUE(headers.HasHeader(HttpRequestHeaders::kTokenBinding)); 15955 EXPECT_TRUE(headers.HasHeader(HttpRequestHeaders::kTokenBinding));
15958 } 15956 }
15959 #endif // !defined(OS_IOS) 15957 #endif // !defined(OS_IOS)
15960 15958
15961 } // namespace net 15959 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_proxy_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698