| 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/quic_packet_creator.h" | 5 #include "net/quic/quic_packet_creator.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 QuicTime::Zero(), | 119 QuicTime::Zero(), |
| 120 Perspective::IS_CLIENT), | 120 Perspective::IS_CLIENT), |
| 121 connection_id_(2), | 121 connection_id_(2), |
| 122 data_("foo"), | 122 data_("foo"), |
| 123 creator_(connection_id_, | 123 creator_(connection_id_, |
| 124 &client_framer_, | 124 &client_framer_, |
| 125 &mock_random_, | 125 &mock_random_, |
| 126 &buffer_allocator_, | 126 &buffer_allocator_, |
| 127 &delegate_), | 127 &delegate_), |
| 128 serialized_packet_(creator_.NoPacket()) { | 128 serialized_packet_(creator_.NoPacket()) { |
| 129 FLAGS_quic_always_log_bugs_for_tests = true; |
| 129 creator_.set_connection_id_length(GetParam().connection_id_length); | 130 creator_.set_connection_id_length(GetParam().connection_id_length); |
| 130 | 131 |
| 131 creator_.SetEncrypter(ENCRYPTION_INITIAL, new NullEncrypter()); | 132 creator_.SetEncrypter(ENCRYPTION_INITIAL, new NullEncrypter()); |
| 132 creator_.SetEncrypter(ENCRYPTION_FORWARD_SECURE, new NullEncrypter()); | 133 creator_.SetEncrypter(ENCRYPTION_FORWARD_SECURE, new NullEncrypter()); |
| 133 client_framer_.set_visitor(&framer_visitor_); | 134 client_framer_.set_visitor(&framer_visitor_); |
| 134 client_framer_.set_received_entropy_calculator(&entropy_calculator_); | 135 client_framer_.set_received_entropy_calculator(&entropy_calculator_); |
| 135 server_framer_.set_visitor(&framer_visitor_); | 136 server_framer_.set_visitor(&framer_visitor_); |
| 136 // TODO(ianswett): Fix this test so it uses a non-null encrypter. | 137 // TODO(ianswett): Fix this test so it uses a non-null encrypter. |
| 137 FLAGS_quic_never_write_unencrypted_data = false; | 138 FLAGS_quic_never_write_unencrypted_data = false; |
| 138 } | 139 } |
| (...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1583 EXPECT_CALL(delegate_, CloseConnection(_, _)); | 1584 EXPECT_CALL(delegate_, CloseConnection(_, _)); |
| 1584 QuicStreamFrame stream_frame(kHeadersStreamId, /*fin=*/false, 0u, | 1585 QuicStreamFrame stream_frame(kHeadersStreamId, /*fin=*/false, 0u, |
| 1585 StringPiece()); | 1586 StringPiece()); |
| 1586 EXPECT_DFATAL(creator_.AddSavedFrame(QuicFrame(&stream_frame)), | 1587 EXPECT_DFATAL(creator_.AddSavedFrame(QuicFrame(&stream_frame)), |
| 1587 "Cannot send stream data without encryption."); | 1588 "Cannot send stream data without encryption."); |
| 1588 } | 1589 } |
| 1589 | 1590 |
| 1590 } // namespace | 1591 } // namespace |
| 1591 } // namespace test | 1592 } // namespace test |
| 1592 } // namespace net | 1593 } // namespace net |
| OLD | NEW |