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

Unified Diff: webrtc/modules/pacing/packet_router_unittest.cc

Issue 2986093003: Add PacketRouterTest.Sanity_NoModuleRegistered_* (Closed)
Patch Set: Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/packet_router_unittest.cc
diff --git a/webrtc/modules/pacing/packet_router_unittest.cc b/webrtc/modules/pacing/packet_router_unittest.cc
index e7f08ca9b5b51684e898a34ab611bcf9519dac3d..47a2b18fa9f6d9558260b2c155aadf07b27c48ad 100644
--- a/webrtc/modules/pacing/packet_router_unittest.cc
+++ b/webrtc/modules/pacing/packet_router_unittest.cc
@@ -37,6 +37,21 @@ class PacketRouterTest : public ::testing::Test {
const std::unique_ptr<PacketRouter> packet_router_;
};
+TEST_F(PacketRouterTest, Sanity_NoModuleRegistered_TimeToSendPacket) {
+ PacketRouter packet_router;
+
+ constexpr uint16_t ssrc = 1234;
+ constexpr uint16_t sequence_number = 17;
+ constexpr uint64_t timestamp = 7890;
+ constexpr bool retransmission = false;
+ const PacedPacketInfo paced_info(1, kProbeMinProbes, kProbeMinBytes);
+
+ // TODO(eladalon): !!! Discuss with reviewers - it's interesting that this
+ // returns true even when no modules are found that match the SSRC.
danilchap 2017/07/28 12:25:48 looking for documentation for the return value of
eladalon 2017/07/29 11:27:10 I'll use this CL to introduce the sanity tests, an
+ EXPECT_TRUE(packet_router.TimeToSendPacket(ssrc, sequence_number, timestamp,
+ retransmission, paced_info));
+}
+
TEST_F(PacketRouterTest, TimeToSendPacket) {
NiceMock<MockRtpRtcp> rtp_1;
NiceMock<MockRtpRtcp> rtp_2;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698