Bug 1679283 - P1. Add test. r=bryce,alwu

Differential Revision: https://phabricator.services.mozilla.com/D98874
This commit is contained in:
Jean-Yves Avenard 2020-12-08 01:19:47 +00:00
Родитель 145e038874
Коммит fcd9bc6cd7
14 изменённых файлов: 41 добавлений и 0 удалений

Двоичные данные
dom/media/mediasource/test/init-trackid2.mp4 Normal file

Двоичный файл не отображается.

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

@ -0,0 +1 @@
Cache-Control: no-store

Двоичные данные
dom/media/mediasource/test/init-trackid3.mp4 Normal file

Двоичный файл не отображается.

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

@ -0,0 +1 @@
Cache-Control: no-store

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

@ -49,6 +49,8 @@ support-files =
tags_before_cluster.webm
tags_before_cluster.webm^header^
1516754.webm 1516754.webm^headers^
init-trackid2.mp4 init-trackid3.mp4 segment-2.0001.m4s segment-2.0001.m4s segment-3.0001.m4s segment-3.0002.m4s
init-trackid2.mp4^headers^ init-trackid3.mp4^headers^ segment-2.0001.m4s^headers^ segment-2.0001.m4s^headers^ segment-3.0001.m4s^headers^ segment-3.0002.m4s^headers^
[test_AbortAfterPartialMediaSegment.html]
[test_AppendPartialInitSegment.html]
@ -143,6 +145,7 @@ skip-if = toolkit == 'android' # Not supported on android
skip-if = toolkit == 'android' # Not supported on android
[test_TimestampOffset_mp4.html]
skip-if = toolkit == 'android' # Not supported on android
[test_trackidchange_mp4.html]
[test_TruncatedDuration.html]
[test_TruncatedDuration_mp4.html]
skip-if = toolkit == 'android' # Not supported on android

Двоичные данные
dom/media/mediasource/test/segment-2.0001.m4s Normal file

Двоичный файл не отображается.

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

@ -0,0 +1 @@
Cache-Control: no-store

Двоичные данные
dom/media/mediasource/test/segment-2.0002.m4s Normal file

Двоичный файл не отображается.

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

@ -0,0 +1 @@
Cache-Control: no-store

Двоичные данные
dom/media/mediasource/test/segment-3.0001.m4s Normal file

Двоичный файл не отображается.

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

@ -0,0 +1 @@
Cache-Control: no-store

Двоичные данные
dom/media/mediasource/test/segment-3.0002.m4s Normal file

Двоичный файл не отображается.

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

@ -0,0 +1 @@
Cache-Control: no-store

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

@ -0,0 +1,32 @@
<!DOCTYPE HTML>
<html>
<head>
<title>MSE: test append of audio with similar init segments that have different track ids</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="mediasource.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
runWithMSE(async (ms, el) => {
el.controls = true;
await once(ms, "sourceopen");
ok(true, "Receive a sourceopen event");
const audiosb = ms.addSourceBuffer("audio/mp4");
await fetchAndLoad(audiosb, "init-trackid2", [''], ".mp4");
await fetchAndLoad(audiosb, "segment-2.0001", [''], ".m4s");
await fetchAndLoad(audiosb, "init-trackid3", [''], ".mp4");
await fetchAndLoad(audiosb, "segment-3.0002", [''], ".m4s");
is(el.buffered.length, 1, "data is buffered");
is(el.buffered.end(0), 8, "all data got appended");
SimpleTest.finish();
});
</script>
</pre>
</body>
</html>