Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: net/quic/core/quic_connection_test.cc

Issue 2430973004: Landing Recent QUIC changes until 10:38 AM, Oct 17, 2016 UTC-4 (Closed)
Patch Set: Improving flagsaver logging Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_connection.cc ('k') | net/quic/core/quic_crypto_client_stream_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 kPeerAddress); 1158 kPeerAddress);
1159 // Cause change in self_address. 1159 // Cause change in self_address.
1160 IPEndPoint self_address(IPAddress(1, 1, 1, 1), 123); 1160 IPEndPoint self_address(IPAddress(1, 1, 1, 1), 123);
1161 EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_ERROR_MIGRATING_ADDRESS, _, _)); 1161 EXPECT_CALL(visitor_, OnConnectionClosed(QUIC_ERROR_MIGRATING_ADDRESS, _, _));
1162 ProcessFramePacketWithAddresses(QuicFrame(&stream_frame), self_address, 1162 ProcessFramePacketWithAddresses(QuicFrame(&stream_frame), self_address,
1163 kPeerAddress); 1163 kPeerAddress);
1164 EXPECT_FALSE(connection_.connected()); 1164 EXPECT_FALSE(connection_.connected());
1165 } 1165 }
1166 1166
1167 TEST_P(QuicConnectionTest, AllowSelfAddressChangeToMappedIpv4AddressAtServer) { 1167 TEST_P(QuicConnectionTest, AllowSelfAddressChangeToMappedIpv4AddressAtServer) {
1168 FLAGS_quic_allow_server_address_change_for_mapped_ipv4 = true;
1169 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); 1168 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
1170 1169
1171 set_perspective(Perspective::IS_SERVER); 1170 set_perspective(Perspective::IS_SERVER);
1172 QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false); 1171 QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false);
1173 1172
1174 EXPECT_EQ(Perspective::IS_SERVER, connection_.perspective()); 1173 EXPECT_EQ(Perspective::IS_SERVER, connection_.perspective());
1175 EXPECT_TRUE(connection_.connected()); 1174 EXPECT_TRUE(connection_.connected());
1176 1175
1177 QuicStreamFrame stream_frame(1u, false, 0u, StringPiece()); 1176 QuicStreamFrame stream_frame(1u, false, 0u, StringPiece());
1178 EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(3); 1177 EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(3);
(...skipping 4101 matching lines...) Expand 10 before | Expand all | Expand 10 after
5280 connection_.SendStreamDataWithString(3, "foo", 0, !kFin, nullptr); 5279 connection_.SendStreamDataWithString(3, "foo", 0, !kFin, nullptr);
5281 EXPECT_EQ(1u, writer_->frame_count()); 5280 EXPECT_EQ(1u, writer_->frame_count());
5282 EXPECT_FALSE(writer_->connection_close_frames().empty()); 5281 EXPECT_FALSE(writer_->connection_close_frames().empty());
5283 // Ack frame is not bundled in connection close packet. 5282 // Ack frame is not bundled in connection close packet.
5284 EXPECT_TRUE(writer_->ack_frames().empty()); 5283 EXPECT_TRUE(writer_->ack_frames().empty());
5285 } 5284 }
5286 5285
5287 } // namespace 5286 } // namespace
5288 } // namespace test 5287 } // namespace test
5289 } // namespace net 5288 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_connection.cc ('k') | net/quic/core/quic_crypto_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698