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

Side by Side Diff: net/quic/congestion_control/tcp_receiver_test.cc

Issue 663043004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "net/quic/congestion_control/tcp_receiver.h" 7 #include "net/quic/congestion_control/tcp_receiver.h"
8 #include "net/quic/test_tools/mock_clock.h" 8 #include "net/quic/test_tools/mock_clock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace net { 11 namespace net {
12 namespace test { 12 namespace test {
13 13
14 class QuicTcpReceiverTest : public ::testing::Test { 14 class QuicTcpReceiverTest : public ::testing::Test {
15 protected: 15 protected:
16 virtual void SetUp() { 16 void SetUp() override { receiver_.reset(new TcpReceiver()); }
17 receiver_.reset(new TcpReceiver());
18 }
19 scoped_ptr<TcpReceiver> receiver_; 17 scoped_ptr<TcpReceiver> receiver_;
20 }; 18 };
21 19
22 TEST_F(QuicTcpReceiverTest, SimpleReceiver) { 20 TEST_F(QuicTcpReceiverTest, SimpleReceiver) {
23 QuicCongestionFeedbackFrame feedback; 21 QuicCongestionFeedbackFrame feedback;
24 QuicTime timestamp(QuicTime::Zero()); 22 QuicTime timestamp(QuicTime::Zero());
25 receiver_->RecordIncomingPacket(1, 1, timestamp); 23 receiver_->RecordIncomingPacket(1, 1, timestamp);
26 ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback)); 24 ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
27 EXPECT_EQ(kTCP, feedback.type); 25 EXPECT_EQ(kTCP, feedback.type);
28 EXPECT_EQ(256000u, feedback.tcp.receive_window); 26 EXPECT_EQ(256000u, feedback.tcp.receive_window);
29 receiver_->RecordIncomingPacket(1, 2, timestamp); 27 receiver_->RecordIncomingPacket(1, 2, timestamp);
30 ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback)); 28 ASSERT_TRUE(receiver_->GenerateCongestionFeedback(&feedback));
31 EXPECT_EQ(kTCP, feedback.type); 29 EXPECT_EQ(kTCP, feedback.type);
32 EXPECT_EQ(256000u, feedback.tcp.receive_window); 30 EXPECT_EQ(256000u, feedback.tcp.receive_window);
33 } 31 }
34 32
35 } // namespace test 33 } // namespace test
36 } // namespace net 34 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender_test.cc ('k') | net/quic/crypto/aes_128_gcm_12_decrypter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698