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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_ack_notifier.h" 5 #include "net/quic/quic_ack_notifier.h"
6 6
7 #include "net/quic/test_tools/quic_test_utils.h" 7 #include "net/quic/test_tools/quic_test_utils.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 EXPECT_FALSE(notifier_->OnAck(3000, zero_)); // updated 60 EXPECT_FALSE(notifier_->OnAck(3000, zero_)); // updated
61 EXPECT_TRUE(notifier_->OnAck(3001, zero_)); // updated 61 EXPECT_TRUE(notifier_->OnAck(3001, zero_)); // updated
62 } 62 }
63 63
64 // Make sure the delegate is called with the delta time from the last ACK. 64 // Make sure the delegate is called with the delta time from the last ACK.
65 TEST_F(QuicAckNotifierTest, DeltaTime) { 65 TEST_F(QuicAckNotifierTest, DeltaTime) {
66 const QuicTime::Delta first_delta = QuicTime::Delta::FromSeconds(5); 66 const QuicTime::Delta first_delta = QuicTime::Delta::FromSeconds(5);
67 const QuicTime::Delta second_delta = QuicTime::Delta::FromSeconds(33); 67 const QuicTime::Delta second_delta = QuicTime::Delta::FromSeconds(33);
68 const QuicTime::Delta third_delta = QuicTime::Delta::FromSeconds(10); 68 const QuicTime::Delta third_delta = QuicTime::Delta::FromSeconds(10);
69 69
70 EXPECT_CALL(*delegate_, 70 EXPECT_CALL(*delegate_, OnAckNotification(3, 123, 0, 0, third_delta))
71 OnAckNotification(3, 123, 0, 0, third_delta))
72 .Times(1); 71 .Times(1);
73 EXPECT_FALSE(notifier_->OnAck(26, first_delta)); 72 EXPECT_FALSE(notifier_->OnAck(26, first_delta));
74 EXPECT_FALSE(notifier_->OnAck(99, second_delta)); 73 EXPECT_FALSE(notifier_->OnAck(99, second_delta));
75 EXPECT_TRUE(notifier_->OnAck(1234, third_delta)); 74 EXPECT_TRUE(notifier_->OnAck(1234, third_delta));
76 } 75 }
77 76
78 } // namespace 77 } // namespace
79 } // namespace test 78 } // namespace test
80 } // namespace net 79 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698