Bug 1362165: Correct test. r=gerald

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

--HG--
extra : rebase_source : 2151dc8bd301b19c53b67e59f4f33746da59c7cb
This commit is contained in:
Jean-Yves Avenard 2017-05-26 23:15:38 +02:00
Родитель b1fcfd70be
Коммит fe6f8b56f7
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -33,9 +33,12 @@
{
var initSegment = MediaSourceUtil.extractSegmentData(mediaData, segmentInfo.init);
test.expectEvent(mediaElement, 'durationchange', 'mediaElement got duration after initsegment');
test.expectEvent(sourceBuffer, 'update');
test.expectEvent(sourceBuffer, 'updateend');
sourceBuffer.appendBuffer(initSegment);
test.waitForExpectedEvents(function()
{
assert_false(sourceBuffer.updating, "updating attribute is false");
test.expectEvent(mediaElement, 'durationchange', 'mediaElement got infinity duration');
mediaSource.duration = Infinity;
test.waitForExpectedEvents(function()