Skip to content

Commit 621b47b

Browse files
Jean-Yves Avenardjgraham
authored andcommitted
Correct test.
the durationchange event will be queued during the initialization segment received algorithm. Only once the init segment has been fully processed will update/updateend be queued. As such, the updateend event must be fired before being able to call appendBuffer once again. MozReview-Commit-ID: GYQNOwWZ7DH Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1362165 [ci skip]
1 parent 0e1edfb commit 621b47b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

media-source/mediasource-seekable.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@
3333
{
3434
var initSegment = MediaSourceUtil.extractSegmentData(mediaData, segmentInfo.init);
3535
test.expectEvent(mediaElement, 'durationchange', 'mediaElement got duration after initsegment');
36+
test.expectEvent(sourceBuffer, 'update');
37+
test.expectEvent(sourceBuffer, 'updateend');
3638
sourceBuffer.appendBuffer(initSegment);
3739
test.waitForExpectedEvents(function()
3840
{
41+
assert_false(sourceBuffer.updating, "updating attribute is false");
3942
test.expectEvent(mediaElement, 'durationchange', 'mediaElement got infinity duration');
4043
mediaSource.duration = Infinity;
4144
test.waitForExpectedEvents(function()

0 commit comments

Comments
 (0)