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

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

Issue 2132623002: Landing Recent QUIC changes until 2016-07-02 02:45 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing comment about RPCs Created 4 years, 5 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_headers_stream.cc ('k') | net/quic/quic_received_packet_manager.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/quic_protocol.h" 5 #include "net/quic/quic_protocol.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 183
184 TEST(QuicProtocolTest, AckFrameToString) { 184 TEST(QuicProtocolTest, AckFrameToString) {
185 QuicAckFrame frame; 185 QuicAckFrame frame;
186 frame.entropy_hash = 1; 186 frame.entropy_hash = 1;
187 frame.largest_observed = 2; 187 frame.largest_observed = 2;
188 frame.ack_delay_time = QuicTime::Delta::FromMicroseconds(3); 188 frame.ack_delay_time = QuicTime::Delta::FromMicroseconds(3);
189 frame.packets.Add(4); 189 frame.packets.Add(4);
190 frame.packets.Add(5); 190 frame.packets.Add(5);
191 frame.received_packet_times = { 191 frame.received_packet_times = {
192 {6, QuicTime::Zero().Add(QuicTime::Delta::FromMicroseconds(7))}}; 192 {6, QuicTime::Zero() + QuicTime::Delta::FromMicroseconds(7)}};
193 std::ostringstream stream; 193 std::ostringstream stream;
194 stream << frame; 194 stream << frame;
195 EXPECT_EQ( 195 EXPECT_EQ(
196 "{ entropy_hash: 1, largest_observed: 2, ack_delay_time: 3, " 196 "{ entropy_hash: 1, largest_observed: 2, ack_delay_time: 3, "
197 "packets: [ 4 5 ], is_truncated: 0, received_packets: [ 6 at 7 ] }\n", 197 "packets: [ 4 5 ], is_truncated: 0, received_packets: [ 6 at 7 ] }\n",
198 stream.str()); 198 stream.str());
199 } 199 }
200 200
201 TEST(QuicProtocolTest, PaddingFrameToString) { 201 TEST(QuicProtocolTest, PaddingFrameToString) {
202 QuicPaddingFrame frame; 202 QuicPaddingFrame frame;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 EXPECT_EQ(10u, queue.LastIntervalLength()); 396 EXPECT_EQ(10u, queue.LastIntervalLength());
397 queue.Remove(9, 21); 397 queue.Remove(9, 21);
398 EXPECT_EQ(3u, queue.NumIntervals()); 398 EXPECT_EQ(3u, queue.NumIntervals());
399 EXPECT_FALSE(queue.Contains(9)); 399 EXPECT_FALSE(queue.Contains(9));
400 EXPECT_FALSE(queue.Contains(20)); 400 EXPECT_FALSE(queue.Contains(20));
401 } 401 }
402 402
403 } // namespace 403 } // namespace
404 } // namespace test 404 } // namespace test
405 } // namespace net 405 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_headers_stream.cc ('k') | net/quic/quic_received_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698