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

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

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 years, 7 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_time_test.cc ('k') | net/quic/core/quic_utils_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_unacked_packet_map.h" 5 #include "net/quic/core/quic_unacked_packet_map.h"
6 6
7 #include "net/quic/platform/api/quic_test.h"
7 #include "net/quic/test_tools/quic_test_utils.h" 8 #include "net/quic/test_tools/quic_test_utils.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace net { 10 namespace net {
11 namespace test { 11 namespace test {
12 namespace { 12 namespace {
13 13
14 // Default packet length. 14 // Default packet length.
15 const uint32_t kDefaultLength = 1000; 15 const uint32_t kDefaultLength = 1000;
16 16
17 class QuicUnackedPacketMapTest : public ::testing::Test { 17 class QuicUnackedPacketMapTest : public QuicTest {
18 protected: 18 protected:
19 QuicUnackedPacketMapTest() 19 QuicUnackedPacketMapTest()
20 : unacked_packets_(), 20 : unacked_packets_(),
21 now_(QuicTime::Zero() + QuicTime::Delta::FromMilliseconds(1000)) {} 21 now_(QuicTime::Zero() + QuicTime::Delta::FromMilliseconds(1000)) {}
22 22
23 ~QuicUnackedPacketMapTest() override {} 23 ~QuicUnackedPacketMapTest() override {}
24 24
25 SerializedPacket CreateRetransmittablePacket(QuicPacketNumber packet_number) { 25 SerializedPacket CreateRetransmittablePacket(QuicPacketNumber packet_number) {
26 return CreateRetransmittablePacketForStream(packet_number, 26 return CreateRetransmittablePacketForStream(packet_number,
27 kHeadersStreamId); 27 kHeadersStreamId);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 EXPECT_FALSE(unacked_packets_.IsUnacked(2)); 377 EXPECT_FALSE(unacked_packets_.IsUnacked(2));
378 EXPECT_TRUE(unacked_packets_.IsUnacked(3)); 378 EXPECT_TRUE(unacked_packets_.IsUnacked(3));
379 EXPECT_FALSE(unacked_packets_.IsUnacked(4)); 379 EXPECT_FALSE(unacked_packets_.IsUnacked(4));
380 EXPECT_TRUE(unacked_packets_.IsUnacked(5)); 380 EXPECT_TRUE(unacked_packets_.IsUnacked(5));
381 EXPECT_EQ(5u, unacked_packets_.largest_sent_packet()); 381 EXPECT_EQ(5u, unacked_packets_.largest_sent_packet());
382 } 382 }
383 383
384 } // namespace 384 } // namespace
385 } // namespace test 385 } // namespace test
386 } // namespace net 386 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_time_test.cc ('k') | net/quic/core/quic_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698