Index: LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html |
diff --git a/LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html b/LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html |
index 7e7a3d383eeab0d6df81a1530ad63aa0e12f9264..512e08551041de966ad11dd25dca6210dd8930fc 100644 |
--- a/LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html |
+++ b/LayoutTests/http/tests/media/media-source/mediasource-timestamp-offset.html |
@@ -41,6 +41,40 @@ |
simpleTimestampOffsetTest(true, 1, 'true'); |
simpleTimestampOffsetTest('10.5', 10.5, 'a number string'); |
simpleTimestampOffsetTest('', 0, 'an empty string'); |
+ |
+ mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData) |
+ { |
+ var initSegment = MediaSourceUtil.extractSegmentData(mediaData, segmentInfo.init); |
+ var mediaSegment = MediaSourceUtil.extractSegmentData(mediaData, segmentInfo.media[0]); |
+ |
+ test.expectEvent(sourceBuffer, "updateend", "initSegment append ended."); |
+ sourceBuffer.appendBuffer(initSegment); |
+ |
+ test.waitForExpectedEvents(function() |
+ { |
+ test.expectEvent(sourceBuffer, "updateend", "mediaSegment append ended."); |
+ sourceBuffer.appendBuffer(mediaSegment); |
+ }); |
+ |
+ test.waitForExpectedEvents(function() |
+ { |
+ mediaSource.endOfStream(); |
+ |
+ assert_equals(mediaSource.readyState, "ended"); |
+ |
+ mediaSource.sourceBuffers[0].timestampOffset = 2; |
+ |
+ assert_equals(mediaSource.readyState, "open"); |
+ |
+ test.expectEvent(mediaSource, "sourceopen", "mediaSource fired 'sourceopen' event."); |
+ }); |
+ |
+ test.waitForExpectedEvents(function() |
+ { |
+ test.done(); |
+ }); |
+ }, "Test setting timestampOffset in 'ended' state causes a transition to 'open'."); |
+ |
</script> |
</body> |
</html> |