| 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/core/quic_connection.h" | 5 #include "net/quic/core/quic_connection.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <ostream> | 9 #include <ostream> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 | 1143 |
| 1144 QuicStreamFrame stream_frame(1u, false, 0u, StringPiece()); | 1144 QuicStreamFrame stream_frame(1u, false, 0u, StringPiece()); |
| 1145 EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(3); | 1145 EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(3); |
| 1146 QuicIpAddress host; | 1146 QuicIpAddress host; |
| 1147 host.FromString("1.1.1.1"); | 1147 host.FromString("1.1.1.1"); |
| 1148 QuicSocketAddress self_address1(host, 443); | 1148 QuicSocketAddress self_address1(host, 443); |
| 1149 ProcessFramePacketWithAddresses(QuicFrame(&stream_frame), self_address1, | 1149 ProcessFramePacketWithAddresses(QuicFrame(&stream_frame), self_address1, |
| 1150 kPeerAddress); | 1150 kPeerAddress); |
| 1151 // Cause self_address change to mapped Ipv4 address. | 1151 // Cause self_address change to mapped Ipv4 address. |
| 1152 QuicIpAddress host2; | 1152 QuicIpAddress host2; |
| 1153 host2.FromString(base::StringPrintf( | 1153 host2.FromString( |
| 1154 "::ffff:%s", connection_.self_address().host().ToString().c_str())); | 1154 QuicStrCat("::ffff:", connection_.self_address().host().ToString())); |
| 1155 QuicSocketAddress self_address2(host2, connection_.self_address().port()); | 1155 QuicSocketAddress self_address2(host2, connection_.self_address().port()); |
| 1156 ProcessFramePacketWithAddresses(QuicFrame(&stream_frame), self_address2, | 1156 ProcessFramePacketWithAddresses(QuicFrame(&stream_frame), self_address2, |
| 1157 kPeerAddress); | 1157 kPeerAddress); |
| 1158 EXPECT_TRUE(connection_.connected()); | 1158 EXPECT_TRUE(connection_.connected()); |
| 1159 // self_address change back to Ipv4 address. | 1159 // self_address change back to Ipv4 address. |
| 1160 ProcessFramePacketWithAddresses(QuicFrame(&stream_frame), self_address1, | 1160 ProcessFramePacketWithAddresses(QuicFrame(&stream_frame), self_address1, |
| 1161 kPeerAddress); | 1161 kPeerAddress); |
| 1162 EXPECT_TRUE(connection_.connected()); | 1162 EXPECT_TRUE(connection_.connected()); |
| 1163 } | 1163 } |
| 1164 | 1164 |
| (...skipping 3953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5118 error_details, ConnectionCloseSource::FROM_PEER)); | 5118 error_details, ConnectionCloseSource::FROM_PEER)); |
| 5119 connection_.set_perspective(Perspective::IS_CLIENT); | 5119 connection_.set_perspective(Perspective::IS_CLIENT); |
| 5120 connection_.CloseConnection(QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT, | 5120 connection_.CloseConnection(QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT, |
| 5121 error_details, | 5121 error_details, |
| 5122 ConnectionCloseBehavior::SILENT_CLOSE); | 5122 ConnectionCloseBehavior::SILENT_CLOSE); |
| 5123 } | 5123 } |
| 5124 | 5124 |
| 5125 } // namespace | 5125 } // namespace |
| 5126 } // namespace test | 5126 } // namespace test |
| 5127 } // namespace net | 5127 } // namespace net |
| OLD | NEW |