Bug 1524890 - P16. Fix mochitests. r=bryce

Differential Revision: https://phabricator.services.mozilla.com/D20330

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jean-Yves Avenard 2019-02-22 09:21:13 +00:00
parent 5569ae1a9c
commit ffc1352b1f
2 changed files with 6 additions and 2 deletions

View File

@ -31,7 +31,7 @@ runWithMSE(async (ms, el) => {
// Seek to the middle of the gap where audio is missing. As we are in readyState = ended
// seeking must complete.
el.currentTime = videosb.buffered.end(0) / 2 + audiosb.buffered.end(0) / 2;
ok(el.currentTime - audiosb.buffered.end(0) > 1, "gap is big enough");
ok(el.currentTime - audiosb.buffered.end(0) >= 1, "gap is big enough");
is(el.buffered.length, 1, "continuous buffered range");
is(el.buffered.end(0), videosb.buffered.end(0),
"buffered range end is aligned with longest track");

View File

@ -37,7 +37,11 @@ runWithMSE(async (ms, el) => {
p = once(el, "ended");
ms.endOfStream();
await p;
is(el.duration, 3.854512, "Video has correct duration: " + el.duration);
// Following bug 1524890, we now implement fully step 8 of the coded frame
// processing algorithm
// http://w3c.github.io/media-source/index.html#sourcebuffer-coded-frame-processing
// As such, duration is exactly the value of videosb.appendWindowEnd
is(el.duration, videosb.appendWindowEnd, "Video has correct duration: " + el.duration);
is(el.currentTime, el.duration, "Video has correct currentTime.");
SimpleTest.finish();
});