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

Side by Side Diff: net/quic/quic_framer_test.cc

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase for ChromeOS Created 4 years, 11 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/quic_crypto_server_stream.cc ('k') | net/quic/quic_socket_address_coder.h » ('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/quic_framer.h" 5 #include "net/quic/quic_framer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after
3026 ASSERT_EQ(QUIC_NO_ERROR, framer_.error()); 3026 ASSERT_EQ(QUIC_NO_ERROR, framer_.error());
3027 ASSERT_TRUE(visitor_.public_reset_packet_.get()); 3027 ASSERT_TRUE(visitor_.public_reset_packet_.get());
3028 EXPECT_EQ(kConnectionId, 3028 EXPECT_EQ(kConnectionId,
3029 visitor_.public_reset_packet_->public_header.connection_id); 3029 visitor_.public_reset_packet_->public_header.connection_id);
3030 EXPECT_TRUE(visitor_.public_reset_packet_->public_header.reset_flag); 3030 EXPECT_TRUE(visitor_.public_reset_packet_->public_header.reset_flag);
3031 EXPECT_FALSE(visitor_.public_reset_packet_->public_header.version_flag); 3031 EXPECT_FALSE(visitor_.public_reset_packet_->public_header.version_flag);
3032 EXPECT_EQ(kNonceProof, visitor_.public_reset_packet_->nonce_proof); 3032 EXPECT_EQ(kNonceProof, visitor_.public_reset_packet_->nonce_proof);
3033 EXPECT_EQ(kPacketNumber, 3033 EXPECT_EQ(kPacketNumber,
3034 visitor_.public_reset_packet_->rejected_packet_number); 3034 visitor_.public_reset_packet_->rejected_packet_number);
3035 EXPECT_EQ("4.31.198.44", 3035 EXPECT_EQ("4.31.198.44",
3036 IPAddressToString( 3036 visitor_.public_reset_packet_->client_address.address().ToString());
3037 visitor_.public_reset_packet_->client_address.address()));
3038 EXPECT_EQ(443, visitor_.public_reset_packet_->client_address.port()); 3037 EXPECT_EQ(443, visitor_.public_reset_packet_->client_address.port());
3039 3038
3040 // Now test framing boundaries. 3039 // Now test framing boundaries.
3041 for (size_t i = 0; i < arraysize(packet); ++i) { 3040 for (size_t i = 0; i < arraysize(packet); ++i) {
3042 string expected_error; 3041 string expected_error;
3043 DVLOG(1) << "iteration: " << i; 3042 DVLOG(1) << "iteration: " << i;
3044 if (i < kConnectionIdOffset) { 3043 if (i < kConnectionIdOffset) {
3045 expected_error = "Unable to read public flags."; 3044 expected_error = "Unable to read public flags.";
3046 CheckProcessingFails(packet, i, expected_error, 3045 CheckProcessingFails(packet, i, expected_error,
3047 QUIC_INVALID_PACKET_HEADER); 3046 QUIC_INVALID_PACKET_HEADER);
(...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after
4956 'o', ' ', 'w', 'o', 4955 'o', ' ', 'w', 'o',
4957 'r', 'l', 'd', '!', 4956 'r', 'l', 'd', '!',
4958 }; 4957 };
4959 // clang-format on 4958 // clang-format on
4960 4959
4961 QuicFramerFuzzFunc(packet, arraysize(packet)); 4960 QuicFramerFuzzFunc(packet, arraysize(packet));
4962 } 4961 }
4963 4962
4964 } // namespace test 4963 } // namespace test
4965 } // namespace net 4964 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_socket_address_coder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698