| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 |
| 11 #include "webrtc/video/send_delay_stats.h" | 11 #include "webrtc/video/send_delay_stats.h" |
| 12 | 12 |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "webrtc/test/gtest.h" |
| 14 #include "webrtc/system_wrappers/include/metrics.h" | 14 #include "webrtc/system_wrappers/include/metrics.h" |
| 15 #include "webrtc/system_wrappers/include/metrics_default.h" | 15 #include "webrtc/system_wrappers/include/metrics_default.h" |
| 16 | 16 |
| 17 namespace webrtc { | 17 namespace webrtc { |
| 18 namespace { | 18 namespace { |
| 19 const uint32_t kSsrc1 = 17; | 19 const uint32_t kSsrc1 = 17; |
| 20 const uint32_t kSsrc2 = 42; | 20 const uint32_t kSsrc2 = 42; |
| 21 const uint32_t kRtxSsrc1 = 18; | 21 const uint32_t kRtxSsrc1 = 18; |
| 22 const uint32_t kRtxSsrc2 = 43; | 22 const uint32_t kRtxSsrc2 = 43; |
| 23 const uint16_t kPacketId = 2345; | 23 const uint16_t kPacketId = 2345; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 clock_.AdvanceTimeMilliseconds(kDelayMs2); | 118 clock_.AdvanceTimeMilliseconds(kDelayMs2); |
| 119 EXPECT_TRUE(OnSentPacket(id)); | 119 EXPECT_TRUE(OnSentPacket(id)); |
| 120 } | 120 } |
| 121 stats_.reset(); | 121 stats_.reset(); |
| 122 EXPECT_EQ(2, metrics::NumSamples("WebRTC.Video.SendDelayInMs")); | 122 EXPECT_EQ(2, metrics::NumSamples("WebRTC.Video.SendDelayInMs")); |
| 123 EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.SendDelayInMs", kDelayMs1)); | 123 EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.SendDelayInMs", kDelayMs1)); |
| 124 EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.SendDelayInMs", kDelayMs2)); | 124 EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.SendDelayInMs", kDelayMs2)); |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace webrtc | 127 } // namespace webrtc |
| OLD | NEW |