From fe6f8b56f737c0db72fbd6025ab180d24edfe7c4 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Fri, 26 May 2017 23:15:38 +0200 Subject: [PATCH] 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 --- .../web-platform/tests/media-source/mediasource-seekable.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testing/web-platform/tests/media-source/mediasource-seekable.html b/testing/web-platform/tests/media-source/mediasource-seekable.html index c379a63ba169..8e228d346610 100644 --- a/testing/web-platform/tests/media-source/mediasource-seekable.html +++ b/testing/web-platform/tests/media-source/mediasource-seekable.html @@ -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()