OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/spdy/spdy_test_util_common.h" | 5 #include "net/spdy/spdy_test_util_common.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <cstddef> | 9 #include <cstddef> |
10 #include <memory> | 10 #include <memory> |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 enable_priority_dependencies(true), | 348 enable_priority_dependencies(true), |
349 enable_spdy31(true), | 349 enable_spdy31(true), |
350 enable_quic(false), | 350 enable_quic(false), |
351 protocol(protocol), | 351 protocol(protocol), |
352 session_max_recv_window_size( | 352 session_max_recv_window_size( |
353 SpdySession::GetDefaultInitialWindowSize(protocol)), | 353 SpdySession::GetDefaultInitialWindowSize(protocol)), |
354 stream_max_recv_window_size( | 354 stream_max_recv_window_size( |
355 SpdySession::GetDefaultInitialWindowSize(protocol)), | 355 SpdySession::GetDefaultInitialWindowSize(protocol)), |
356 time_func(&base::TimeTicks::Now), | 356 time_func(&base::TimeTicks::Now), |
357 parse_alternative_services(true), | 357 parse_alternative_services(true), |
358 enable_alternative_service_with_different_host(false), | 358 enable_alternative_service_with_different_host(true), |
359 net_log(NULL) { | 359 net_log(NULL) { |
360 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; | 360 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; |
361 | 361 |
362 // Note: The CancelledTransaction test does cleanup by running all | 362 // Note: The CancelledTransaction test does cleanup by running all |
363 // tasks in the message loop (RunAllPending). Unfortunately, that | 363 // tasks in the message loop (RunAllPending). Unfortunately, that |
364 // doesn't clean up tasks on the host resolver thread; and | 364 // doesn't clean up tasks on the host resolver thread; and |
365 // TCPConnectJob is currently not cancellable. Using synchronous | 365 // TCPConnectJob is currently not cancellable. Using synchronous |
366 // lookups allows the test to shutdown cleanly. Until we have | 366 // lookups allows the test to shutdown cleanly. Until we have |
367 // cancellable TCPConnectJobs, use synchronous lookups. | 367 // cancellable TCPConnectJobs, use synchronous lookups. |
368 host_resolver->set_synchronous_mode(true); | 368 host_resolver->set_synchronous_mode(true); |
(...skipping 18 matching lines...) Expand all Loading... |
387 enable_priority_dependencies(true), | 387 enable_priority_dependencies(true), |
388 enable_spdy31(true), | 388 enable_spdy31(true), |
389 enable_quic(false), | 389 enable_quic(false), |
390 protocol(protocol), | 390 protocol(protocol), |
391 session_max_recv_window_size( | 391 session_max_recv_window_size( |
392 SpdySession::GetDefaultInitialWindowSize(protocol)), | 392 SpdySession::GetDefaultInitialWindowSize(protocol)), |
393 stream_max_recv_window_size( | 393 stream_max_recv_window_size( |
394 SpdySession::GetDefaultInitialWindowSize(protocol)), | 394 SpdySession::GetDefaultInitialWindowSize(protocol)), |
395 time_func(&base::TimeTicks::Now), | 395 time_func(&base::TimeTicks::Now), |
396 parse_alternative_services(true), | 396 parse_alternative_services(true), |
397 enable_alternative_service_with_different_host(false), | 397 enable_alternative_service_with_different_host(true), |
398 net_log(NULL) { | 398 net_log(NULL) { |
399 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; | 399 DCHECK(next_proto_is_spdy(protocol)) << "Invalid protocol: " << protocol; |
400 } | 400 } |
401 | 401 |
402 SpdySessionDependencies::~SpdySessionDependencies() {} | 402 SpdySessionDependencies::~SpdySessionDependencies() {} |
403 | 403 |
404 // static | 404 // static |
405 std::unique_ptr<HttpNetworkSession> SpdySessionDependencies::SpdyCreateSession( | 405 std::unique_ptr<HttpNetworkSession> SpdySessionDependencies::SpdyCreateSession( |
406 SpdySessionDependencies* session_deps) { | 406 SpdySessionDependencies* session_deps) { |
407 HttpNetworkSession::Params params = CreateSessionParams(session_deps); | 407 HttpNetworkSession::Params params = CreateSessionParams(session_deps); |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 } | 1314 } |
1315 } | 1315 } |
1316 | 1316 |
1317 void SpdyTestUtil::SetPriority(RequestPriority priority, | 1317 void SpdyTestUtil::SetPriority(RequestPriority priority, |
1318 SpdySynStreamIR* ir) const { | 1318 SpdySynStreamIR* ir) const { |
1319 ir->set_priority(ConvertRequestPriorityToSpdyPriority( | 1319 ir->set_priority(ConvertRequestPriorityToSpdyPriority( |
1320 priority, spdy_version())); | 1320 priority, spdy_version())); |
1321 } | 1321 } |
1322 | 1322 |
1323 } // namespace net | 1323 } // namespace net |
OLD | NEW |