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

Side by Side Diff: webrtc/p2p/quic/quicconnectionhelper_unittest.cc

Issue 1910633003: Update QuicTransportChannel to latest version of libquic (Chromium: f03d2c62) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Sync to upstream Created 4 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 | « no previous file | webrtc/p2p/quic/quicsession.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 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 private: 47 private:
48 QuicTime now_; 48 QuicTime now_;
49 }; 49 };
50 50
51 // Implements OnAlarm() event which alarm triggers. 51 // Implements OnAlarm() event which alarm triggers.
52 class MockAlarmDelegate : public QuicAlarm::Delegate { 52 class MockAlarmDelegate : public QuicAlarm::Delegate {
53 public: 53 public:
54 MockAlarmDelegate() : fired_(false) {} 54 MockAlarmDelegate() : fired_(false) {}
55 55
56 QuicTime OnAlarm() override { 56 void OnAlarm() override { fired_ = true; }
57 fired_ = true;
58 return QuicTime::Zero();
59 }
60 57
61 bool fired() const { return fired_; } 58 bool fired() const { return fired_; }
62 void Clear() { fired_ = false; } 59 void Clear() { fired_ = false; }
63 60
64 private: 61 private:
65 bool fired_; 62 bool fired_;
66 }; 63 };
67 64
68 class QuicAlarmTest : public ::testing::Test { 65 class QuicAlarmTest : public ::testing::Test {
69 public: 66 public:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 ASSERT_FALSE(delegate_->fired()); 116 ASSERT_FALSE(delegate_->fired());
120 } 117 }
121 118
122 // Test that timing for posting task is accurate. 119 // Test that timing for posting task is accurate.
123 TEST_F(QuicAlarmTest, AlarmGetDelay) { 120 TEST_F(QuicAlarmTest, AlarmGetDelay) {
124 SetTime(1000000); 121 SetTime(1000000);
125 EXPECT_EQ(1000, alarm_->GetDelay()); 122 EXPECT_EQ(1000, alarm_->GetDelay());
126 clock_.AdvanceTime(QuicTime::Delta::FromMicroseconds(300000)); 123 clock_.AdvanceTime(QuicTime::Delta::FromMicroseconds(300000));
127 EXPECT_EQ(700, alarm_->GetDelay()); 124 EXPECT_EQ(700, alarm_->GetDelay());
128 } 125 }
OLDNEW
« no previous file with comments | « no previous file | webrtc/p2p/quic/quicsession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698