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

Unified Diff: media/cast/net/pacing/paced_sender_unittest.cc

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative workaround fix for win8_chromium_ng compile error. Created 5 years 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 | « media/cast/net/pacing/paced_sender.cc ('k') | media/cast/net/rtcp/receiver_rtcp_event_subscriber.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/net/pacing/paced_sender_unittest.cc
diff --git a/media/cast/net/pacing/paced_sender_unittest.cc b/media/cast/net/pacing/paced_sender_unittest.cc
index 78d8a1c7e693e12b36b29b1bb0d8c4fa3bed7dd3..f9192c7fb3688f49dc3e3ff1b54369efa60798d0 100644
--- a/media/cast/net/pacing/paced_sender_unittest.cc
+++ b/media/cast/net/pacing/paced_sender_unittest.cc
@@ -27,7 +27,8 @@ static const size_t kNackSize = 105;
static const int64_t kStartMillisecond = INT64_C(12345678900000);
static const uint32_t kVideoSsrc = 0x1234;
static const uint32_t kAudioSsrc = 0x5678;
-static const uint32_t kFrameRtpTimestamp = 12345;
+static const uint32_t kVideoFrameRtpTimestamp = 12345;
+static const uint32_t kAudioFrameRtpTimestamp = 23456;
class TestPacketSender : public PacketSender {
public:
@@ -92,7 +93,8 @@ class PacedSenderTest : public ::testing::Test {
base::BigEndianWriter writer(reinterpret_cast<char*>(&packet->data[0]),
packet_size);
bool success = writer.Skip(4);
- success &= writer.WriteU32(kFrameRtpTimestamp);
+ success &= writer.WriteU32(audio ? kAudioFrameRtpTimestamp
+ : kVideoFrameRtpTimestamp);
success &= writer.WriteU32(audio ? kAudioSsrc : kVideoSsrc);
success &= writer.Skip(2);
success &= writer.WriteU16(i);
@@ -185,7 +187,7 @@ TEST_F(PacedSenderTest, BasicPace) {
ASSERT_GE(latest_event_timestamp, e.timestamp);
ASSERT_EQ(PACKET_SENT_TO_NETWORK, e.type);
ASSERT_EQ(VIDEO_EVENT, e.media_type);
- ASSERT_EQ(kFrameRtpTimestamp, e.rtp_timestamp);
+ ASSERT_EQ(kVideoFrameRtpTimestamp, e.rtp_timestamp.lower_32_bits());
ASSERT_EQ(num_of_packets - 1, e.max_packet_id);
ASSERT_EQ(expected_packet_id++, e.packet_id);
ASSERT_EQ(kSize1, e.size);
« no previous file with comments | « media/cast/net/pacing/paced_sender.cc ('k') | media/cast/net/rtcp/receiver_rtcp_event_subscriber.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698