| 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 <memory> | 5 #include <memory> |
| 6 #include <ostream> | 6 #include <ostream> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "net/proxy/proxy_service.h" | 39 #include "net/proxy/proxy_service.h" |
| 40 #include "net/quic/chromium/crypto/proof_verifier_chromium.h" | 40 #include "net/quic/chromium/crypto/proof_verifier_chromium.h" |
| 41 #include "net/quic/chromium/mock_crypto_client_stream_factory.h" | 41 #include "net/quic/chromium/mock_crypto_client_stream_factory.h" |
| 42 #include "net/quic/chromium/mock_network_change_notifier.h" | 42 #include "net/quic/chromium/mock_network_change_notifier.h" |
| 43 #include "net/quic/chromium/mock_quic_data.h" | 43 #include "net/quic/chromium/mock_quic_data.h" |
| 44 #include "net/quic/chromium/quic_http_utils.h" | 44 #include "net/quic/chromium/quic_http_utils.h" |
| 45 #include "net/quic/chromium/quic_test_packet_maker.h" | 45 #include "net/quic/chromium/quic_test_packet_maker.h" |
| 46 #include "net/quic/core/crypto/quic_decrypter.h" | 46 #include "net/quic/core/crypto/quic_decrypter.h" |
| 47 #include "net/quic/core/crypto/quic_encrypter.h" | 47 #include "net/quic/core/crypto/quic_encrypter.h" |
| 48 #include "net/quic/core/quic_framer.h" | 48 #include "net/quic/core/quic_framer.h" |
| 49 #include "net/quic/platform/api/quic_string_piece.h" |
| 49 #include "net/quic/test_tools/crypto_test_utils.h" | 50 #include "net/quic/test_tools/crypto_test_utils.h" |
| 50 #include "net/quic/test_tools/mock_clock.h" | 51 #include "net/quic/test_tools/mock_clock.h" |
| 51 #include "net/quic/test_tools/mock_random.h" | 52 #include "net/quic/test_tools/mock_random.h" |
| 52 #include "net/quic/test_tools/quic_test_utils.h" | 53 #include "net/quic/test_tools/quic_test_utils.h" |
| 53 #include "net/socket/client_socket_factory.h" | 54 #include "net/socket/client_socket_factory.h" |
| 54 #include "net/socket/mock_client_socket_pool_manager.h" | 55 #include "net/socket/mock_client_socket_pool_manager.h" |
| 55 #include "net/socket/next_proto.h" | 56 #include "net/socket/next_proto.h" |
| 56 #include "net/socket/socket_performance_watcher.h" | 57 #include "net/socket/socket_performance_watcher.h" |
| 57 #include "net/socket/socket_performance_watcher_factory.h" | 58 #include "net/socket/socket_performance_watcher_factory.h" |
| 58 #include "net/socket/socket_test_util.h" | 59 #include "net/socket/socket_test_util.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 const std::string& alt_svc) { | 395 const std::string& alt_svc) { |
| 395 return server_maker_.GetResponseHeaders(status, alt_svc); | 396 return server_maker_.GetResponseHeaders(status, alt_svc); |
| 396 } | 397 } |
| 397 | 398 |
| 398 std::unique_ptr<QuicEncryptedPacket> ConstructServerDataPacket( | 399 std::unique_ptr<QuicEncryptedPacket> ConstructServerDataPacket( |
| 399 QuicPacketNumber packet_number, | 400 QuicPacketNumber packet_number, |
| 400 QuicStreamId stream_id, | 401 QuicStreamId stream_id, |
| 401 bool should_include_version, | 402 bool should_include_version, |
| 402 bool fin, | 403 bool fin, |
| 403 QuicStreamOffset offset, | 404 QuicStreamOffset offset, |
| 404 base::StringPiece data) { | 405 QuicStringPiece data) { |
| 405 return server_maker_.MakeDataPacket( | 406 return server_maker_.MakeDataPacket( |
| 406 packet_number, stream_id, should_include_version, fin, offset, data); | 407 packet_number, stream_id, should_include_version, fin, offset, data); |
| 407 } | 408 } |
| 408 | 409 |
| 409 std::unique_ptr<QuicEncryptedPacket> ConstructClientDataPacket( | 410 std::unique_ptr<QuicEncryptedPacket> ConstructClientDataPacket( |
| 410 QuicPacketNumber packet_number, | 411 QuicPacketNumber packet_number, |
| 411 QuicStreamId stream_id, | 412 QuicStreamId stream_id, |
| 412 bool should_include_version, | 413 bool should_include_version, |
| 413 bool fin, | 414 bool fin, |
| 414 QuicStreamOffset offset, | 415 QuicStreamOffset offset, |
| 415 base::StringPiece data) { | 416 QuicStringPiece data) { |
| 416 return client_maker_.MakeDataPacket( | 417 return client_maker_.MakeDataPacket( |
| 417 packet_number, stream_id, should_include_version, fin, offset, data); | 418 packet_number, stream_id, should_include_version, fin, offset, data); |
| 418 } | 419 } |
| 419 | 420 |
| 420 std::unique_ptr<QuicEncryptedPacket> ConstructClientForceHolDataPacket( | 421 std::unique_ptr<QuicEncryptedPacket> ConstructClientForceHolDataPacket( |
| 421 QuicPacketNumber packet_number, | 422 QuicPacketNumber packet_number, |
| 422 QuicStreamId stream_id, | 423 QuicStreamId stream_id, |
| 423 bool should_include_version, | 424 bool should_include_version, |
| 424 bool fin, | 425 bool fin, |
| 425 QuicStreamOffset* offset, | 426 QuicStreamOffset* offset, |
| 426 base::StringPiece data) { | 427 QuicStringPiece data) { |
| 427 return client_maker_.MakeForceHolDataPacket( | 428 return client_maker_.MakeForceHolDataPacket( |
| 428 packet_number, stream_id, should_include_version, fin, offset, data); | 429 packet_number, stream_id, should_include_version, fin, offset, data); |
| 429 } | 430 } |
| 430 | 431 |
| 431 std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket( | 432 std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket( |
| 432 QuicPacketNumber packet_number, | 433 QuicPacketNumber packet_number, |
| 433 QuicStreamId stream_id, | 434 QuicStreamId stream_id, |
| 434 bool should_include_version, | 435 bool should_include_version, |
| 435 bool fin, | 436 bool fin, |
| 436 SpdyHeaderBlock headers, | 437 SpdyHeaderBlock headers, |
| (...skipping 3065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3502 AddHangingSocketData(); | 3503 AddHangingSocketData(); |
| 3503 | 3504 |
| 3504 SendRequestAndExpectQuicResponse(origin1_); | 3505 SendRequestAndExpectQuicResponse(origin1_); |
| 3505 SendRequestAndExpectQuicResponse(origin2_); | 3506 SendRequestAndExpectQuicResponse(origin2_); |
| 3506 | 3507 |
| 3507 EXPECT_TRUE(AllDataConsumed()); | 3508 EXPECT_TRUE(AllDataConsumed()); |
| 3508 } | 3509 } |
| 3509 | 3510 |
| 3510 } // namespace test | 3511 } // namespace test |
| 3511 } // namespace net | 3512 } // namespace net |
| OLD | NEW |