| 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 "net/quic/test_tools/quic_test_utils.h" | 5 #include "net/quic/test_tools/quic_test_utils.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "base/strings/string_piece.h" | |
| 9 #include "net/quic/crypto/crypto_framer.h" | 8 #include "net/quic/crypto/crypto_framer.h" |
| 10 #include "net/quic/crypto/crypto_handshake.h" | 9 #include "net/quic/crypto/crypto_handshake.h" |
| 11 #include "net/quic/crypto/crypto_utils.h" | 10 #include "net/quic/crypto/crypto_utils.h" |
| 12 #include "net/quic/crypto/null_encrypter.h" | 11 #include "net/quic/crypto/null_encrypter.h" |
| 13 #include "net/quic/crypto/quic_decrypter.h" | 12 #include "net/quic/crypto/quic_decrypter.h" |
| 14 #include "net/quic/crypto/quic_encrypter.h" | 13 #include "net/quic/crypto/quic_encrypter.h" |
| 15 #include "net/quic/quic_framer.h" | 14 #include "net/quic/quic_framer.h" |
| 16 #include "net/quic/quic_packet_creator.h" | 15 #include "net/quic/quic_packet_creator.h" |
| 17 #include "net/spdy/spdy_frame_builder.h" | |
| 18 | 16 |
| 19 using base::StringPiece; | |
| 20 using std::max; | 17 using std::max; |
| 21 using std::min; | 18 using std::min; |
| 22 using std::string; | 19 using std::string; |
| 23 using testing::_; | 20 using testing::_; |
| 24 | 21 |
| 25 namespace net { | 22 namespace net { |
| 26 namespace test { | 23 namespace test { |
| 27 | 24 |
| 28 MockFramerVisitor::MockFramerVisitor() { | 25 MockFramerVisitor::MockFramerVisitor() { |
| 29 // By default, we want to accept packets. | 26 // By default, we want to accept packets. |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 // or the ack frame; that all our test are configured correctly. | 369 // or the ack frame; that all our test are configured correctly. |
| 373 DCHECK_GE(packet_length, ack_length); | 370 DCHECK_GE(packet_length, ack_length); |
| 374 return packet_length; | 371 return packet_length; |
| 375 } | 372 } |
| 376 | 373 |
| 377 QuicPacketEntropyHash TestEntropyCalculator::ReceivedEntropyHash( | 374 QuicPacketEntropyHash TestEntropyCalculator::ReceivedEntropyHash( |
| 378 QuicPacketSequenceNumber sequence_number) const { | 375 QuicPacketSequenceNumber sequence_number) const { |
| 379 return 1u; | 376 return 1u; |
| 380 } | 377 } |
| 381 | 378 |
| 382 bool TestDecompressorVisitor::OnDecompressedData(StringPiece data) { | |
| 383 data.AppendToString(&data_); | |
| 384 return true; | |
| 385 } | |
| 386 | |
| 387 } // namespace test | 379 } // namespace test |
| 388 } // namespace net | 380 } // namespace net |
| OLD | NEW |