| 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 8d66adc97c6e7b1302e8e66a03e144559439d287..7b525b90b21eb2a8eea0333f6ed937f21cdf928f 100644
|
| --- a/media/filters/source_buffer_stream_unittest.cc
|
| +++ b/media/filters/source_buffer_stream_unittest.cc
|
| @@ -3225,6 +3225,31 @@ TEST_F(SourceBufferStreamTest, Remove_GOPBeingAppended) {
|
| CheckExpectedBuffers("240K 270 300");
|
| }
|
|
|
| +
|
| +TEST_F(SourceBufferStreamTest,
|
| + Remove_PreviousAppendDestroyedAndOverwriteExistingRange) {
|
| + SeekToTimestamp(base::TimeDelta::FromMilliseconds(90));
|
| +
|
| + NewSegmentAppend("90K 120 150");
|
| + CheckExpectedRangesByTimestamp("{ [90,180) }");
|
| +
|
| + // Append a segment before the previously appended data.
|
| + NewSegmentAppend("0K 30 60");
|
| +
|
| + // Verify that the ranges get merged.
|
| + CheckExpectedRangesByTimestamp("{ [0,180) }");
|
| +
|
| + // Remove the data from the last append.
|
| + RemoveInMs(0, 90, 360);
|
| + CheckExpectedRangesByTimestamp("{ [90,180) }");
|
| +
|
| + // Append a new segment that follows the removed segment and
|
| + // starts at the beginning of the range left over from the
|
| + // remove.
|
| + NewSegmentAppend("90K 121 151");
|
| + CheckExpectedBuffers("90K 121 151");
|
| +}
|
| +
|
| // TODO(vrk): Add unit tests where keyframes are unaligned between streams.
|
| // (crbug.com/133557)
|
|
|
|
|