Update web-platform-tests to revision cf261625e2d230ab219eec966f4abe26e3401b64

This commit is contained in:
WPT Sync Bot 2018-05-29 21:17:45 -04:00
parent 11a89bcc47
commit 8f98acd0e7
297 changed files with 3396 additions and 1555 deletions

View file

@ -586,6 +586,37 @@
test.done();
}, "Test appending after removeSourceBuffer().");
mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
{
// Media elements using MSE should not fire the stalled event. See discussion at
// https://github.com/w3c/media-source/issues/88#issuecomment-374406928
mediaElement.addEventListener("stalled", test.unreached_func("Unexpected 'stalled' event."));
// Prime the media element with initial appends.
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()
{
assert_equals(mediaSource.readyState, "open", "readyState is open after init segment appended.");
test.expectEvent(sourceBuffer, "updateend", "mediaSegment append ended.");
sourceBuffer.appendBuffer(mediaSegment);
});
// Verify state and wait for the 'stalled' event.
test.waitForExpectedEvents(function()
{
assert_equals(sourceBuffer.buffered.length, 1, "sourceBuffer has a buffered range");
assert_equals(mediaSource.readyState, "open", "readyState is open after media segment appended.");
// Set timeout to 4 seconds. This creates an opportunity for UAs to _improperly_ fire the stalled event.
// For media elements doing progressive download (not MSE), stalled is thrown after ~3 seconds of the
// download failing to progress.
test.step_timeout(function() { test.done(); }, 4000);
});
}, "Test slow appending does not trigger stalled events.");
</script>
</body>
</html>