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

Unified Diff: media/cast/rtcp/rtcp_unittest.cc

Issue 34623008: Change to calculate the real NTP in TimeTicks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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
Index: media/cast/rtcp/rtcp_unittest.cc
diff --git a/media/cast/rtcp/rtcp_unittest.cc b/media/cast/rtcp/rtcp_unittest.cc
index a4213ff60537879f64cfa789a9f7feae608d36e6..c1752b5e7ab8e2c263207773ead94d7b4ddc157a 100644
--- a/media/cast/rtcp/rtcp_unittest.cc
+++ b/media/cast/rtcp/rtcp_unittest.cc
@@ -4,6 +4,7 @@
#include "base/test/simple_test_tick_clock.h"
#include "media/cast/cast_defines.h"
+#include "media/cast/cast_ntp_tick_clock.h"
#include "media/cast/pacing/paced_sender.h"
#include "media/cast/rtcp/mock_rtcp_receiver_feedback.h"
#include "media/cast/rtcp/mock_rtcp_sender_feedback.h"
@@ -298,20 +299,10 @@ TEST_F(RtcpTest, Rtt) {
}
TEST_F(RtcpTest, NtpAndTime) {
- RtcpPeer rtcp_peer(&testing_clock_,
- &mock_sender_feedback_,
- NULL,
- NULL,
- NULL,
- kRtcpReducedSize,
- base::TimeDelta::FromMilliseconds(kRtcpIntervalMs),
- false,
- kReceiverSsrc,
- kCName);
uint32 ntp_seconds = 0;
uint32 ntp_fractions = 0;
base::TimeTicks input_time = base::TimeTicks::FromInternalValue(
- 12345678901000LL + kNtpEpochDeltaMicroseconds);
+ 12345678901000LL);
ConvertTimeToNtp(input_time, &ntp_seconds, &ntp_fractions);
EXPECT_EQ(12345678u, ntp_seconds);
EXPECT_EQ(input_time,
@@ -368,7 +359,7 @@ TEST_F(RtcpTest, RtpTimestampInSenderTime) {
uint32 ntp_seconds = 0;
uint32 ntp_fractions = 0;
base::TimeTicks input_time = base::TimeTicks::FromInternalValue(
- 12345678901000LL + kNtpEpochDeltaMicroseconds);
+ 12345678901000LL);
// Test exact match.
ConvertTimeToNtp(input_time, &ntp_seconds, &ntp_fractions);

Powered by Google App Engine
This is Rietveld 408576698