OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 28 matching lines...) Expand all Loading... |
39 void IncreaseTime(int inc_ms); | 39 void IncreaseTime(int inc_ms); |
40 | 40 |
41 DelayManager* dm_; | 41 DelayManager* dm_; |
42 TickTimer tick_timer_; | 42 TickTimer tick_timer_; |
43 MockDelayPeakDetector detector_; | 43 MockDelayPeakDetector detector_; |
44 uint16_t seq_no_; | 44 uint16_t seq_no_; |
45 uint32_t ts_; | 45 uint32_t ts_; |
46 }; | 46 }; |
47 | 47 |
48 DelayManagerTest::DelayManagerTest() | 48 DelayManagerTest::DelayManagerTest() |
49 : dm_(NULL), detector_(&tick_timer_), seq_no_(0x1234), ts_(0x12345678) {} | 49 : dm_(nullptr), detector_(&tick_timer_), seq_no_(0x1234), ts_(0x12345678) {} |
50 | 50 |
51 void DelayManagerTest::SetUp() { | 51 void DelayManagerTest::SetUp() { |
52 EXPECT_CALL(detector_, Reset()) | 52 EXPECT_CALL(detector_, Reset()) |
53 .Times(1); | 53 .Times(1); |
54 dm_ = new DelayManager(kMaxNumberOfPackets, &detector_, &tick_timer_); | 54 dm_ = new DelayManager(kMaxNumberOfPackets, &detector_, &tick_timer_); |
55 } | 55 } |
56 | 56 |
57 void DelayManagerTest::SetPacketAudioLength(int lengt_ms) { | 57 void DelayManagerTest::SetPacketAudioLength(int lengt_ms) { |
58 EXPECT_CALL(detector_, SetPacketAudioLength(lengt_ms)); | 58 EXPECT_CALL(detector_, SetPacketAudioLength(lengt_ms)); |
59 dm_->SetPacketAudioLength(lengt_ms); | 59 dm_->SetPacketAudioLength(lengt_ms); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 EXPECT_TRUE(dm_->SetMaximumDelay(10)); | 277 EXPECT_TRUE(dm_->SetMaximumDelay(10)); |
278 EXPECT_FALSE(dm_->SetMinimumDelay(20)); | 278 EXPECT_FALSE(dm_->SetMinimumDelay(20)); |
279 | 279 |
280 // Maximum delay less than minimum delay is not accepted. | 280 // Maximum delay less than minimum delay is not accepted. |
281 EXPECT_TRUE(dm_->SetMaximumDelay(100)); | 281 EXPECT_TRUE(dm_->SetMaximumDelay(100)); |
282 EXPECT_TRUE(dm_->SetMinimumDelay(80)); | 282 EXPECT_TRUE(dm_->SetMinimumDelay(80)); |
283 EXPECT_FALSE(dm_->SetMaximumDelay(60)); | 283 EXPECT_FALSE(dm_->SetMaximumDelay(60)); |
284 } | 284 } |
285 | 285 |
286 } // namespace webrtc | 286 } // namespace webrtc |
OLD | NEW |