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

Unified Diff: media/filters/source_buffer_stream_unittest.cc

Issue 23703007: Fix SourceBufferStream::Remove() for buffers before the current play position. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comment Created 7 years, 3 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 | « media/filters/source_buffer_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3c120745b4e9a8a455467bafed5386e206058a99..050717545131fc931d71761518e1628b95ff9b90 100644
--- a/media/filters/source_buffer_stream_unittest.cc
+++ b/media/filters/source_buffer_stream_unittest.cc
@@ -2940,7 +2940,7 @@ TEST_F(SourceBufferStreamTest, Remove_Partial4) {
CheckExpectedRangesByTimestamp("{ [10,40) [2060,2150) }");
}
-// Test behavior when the current positing is removed and new buffers
+// Test behavior when the current position is removed and new buffers
// are appended over the removal range.
TEST_F(SourceBufferStreamTest, Remove_CurrentPosition) {
Seek(0);
@@ -2964,6 +2964,21 @@ TEST_F(SourceBufferStreamTest, Remove_CurrentPosition) {
CheckExpectedBuffers("210K 240 270K 300 330");
}
+// Test behavior when buffers in the selected range before the current position
+// are removed.
+TEST_F(SourceBufferStreamTest, Remove_BeforeCurrentPosition) {
+ Seek(0);
+ NewSegmentAppend("0K 30 60 90K 120 150 180K 210 240 270K 300 330");
+ CheckExpectedRangesByTimestamp("{ [0,360) }");
+ CheckExpectedBuffers("0K 30 60 90K 120");
+
+ // Remove a range that is before the current playback position.
+ RemoveInMs(0, 90, 360);
+ CheckExpectedRangesByTimestamp("{ [90,360) }");
+
+ CheckExpectedBuffers("150 180K 210 240 270K 300 330");
+}
+
// TODO(vrk): Add unit tests where keyframes are unaligned between streams.
// (crbug.com/133557)
« no previous file with comments | « media/filters/source_buffer_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698