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

Unified Diff: media/filters/source_buffer_stream_unittest.cc

Issue 2102323002: MSE: Experimental support for new abort and duration behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/filters/source_buffer_stream_unittest.cc
diff --git a/media/filters/source_buffer_stream_unittest.cc b/media/filters/source_buffer_stream_unittest.cc
index 1c73e0581231f78e064b8bdea645dfb0cdf62819..fb8fcfcb01899ccab109655da89c1c86b7cbc669 100644
--- a/media/filters/source_buffer_stream_unittest.cc
+++ b/media/filters/source_buffer_stream_unittest.cc
@@ -4795,6 +4795,31 @@ TEST_F(SourceBufferStreamTest,
CheckNoNextBuffer();
}
+TEST_F(SourceBufferStreamTest, GetHighestPresentationTimestamp) {
+ // TODO(wolenetz): Add coverage for when DTS != PTS once
+ // https://crbug.com/398130 is fixed.
+
+ EXPECT_EQ(base::TimeDelta(), stream_->GetHighestPresentationTimestamp());
+
+ NewCodedFrameGroupAppend("0K 10K");
+ EXPECT_EQ(base::TimeDelta::FromMilliseconds(10),
+ stream_->GetHighestPresentationTimestamp());
+
+ RemoveInMs(0, 10, 20);
+ EXPECT_EQ(base::TimeDelta::FromMilliseconds(10),
+ stream_->GetHighestPresentationTimestamp());
+
+ RemoveInMs(10, 20, 20);
+ EXPECT_EQ(base::TimeDelta(), stream_->GetHighestPresentationTimestamp());
+
+ NewCodedFrameGroupAppend("0K 10K");
+ EXPECT_EQ(base::TimeDelta::FromMilliseconds(10),
+ stream_->GetHighestPresentationTimestamp());
+
+ RemoveInMs(10, 20, 20);
+ EXPECT_EQ(base::TimeDelta(), stream_->GetHighestPresentationTimestamp());
+}
+
// TODO(vrk): Add unit tests where keyframes are unaligned between streams.
// (crbug.com/133557)

Powered by Google App Engine
This is Rietveld 408576698