зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1350932: P1. Add mochitest. r=gerald
Add an AVC3 (content provided by BBC) mochitest. We've regressed BBC playback rather regularly. Better make sure this never happens again. MozReview-Commit-ID: 5ssaLcqiqsv --HG-- extra : rebase_source : 27938e746822f89167f287d57c81f276198b2c5e
This commit is contained in:
Родитель
c2450fbc4d
Коммит
45f18b6e83
Двоичный файл не отображается.
|
@ -0,0 +1 @@
|
|||
Cache-Control: no-store
|
Двоичный файл не отображается.
|
@ -0,0 +1 @@
|
|||
Cache-Control: no-store
|
|
@ -44,7 +44,10 @@ support-files =
|
|||
bipbop/bipbop_480_624kbps-video2.m4s bipbop/bipbop_480_624kbps-video2.m4s^headers^
|
||||
flac/IS.mp4 flac/IS.mp4^headers^ flac/00001.m4s flac/00001.m4s^headers^
|
||||
flac/00002.m4s flac/00002.m4s^headers^ flac/00003.m4s flac/00003.m4s^headers^
|
||||
avc3/init.mp4 avc3/init.mp4^headers^ avc3/segment1.m4s avc3/segment1.m4s^headers^
|
||||
|
||||
[test_AVC3_mp4.html]
|
||||
skip-if = ((os == "win" && os_version == "5.1") || (toolkit == 'android')) # Not supported on xp and android 2.3
|
||||
[test_AudioChange_mp4.html]
|
||||
skip-if = ((os == "win" && os_version == "5.1") || (toolkit == 'android')) # Not supported on xp and android 2.3
|
||||
[test_AutoRevocation.html]
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>MSE: AVC3 content playback.</title>
|
||||
<script type="text/javascript" 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(function(ms, el) {
|
||||
|
||||
once(ms, 'sourceopen').then(function() {
|
||||
ok(true, "Receive a sourceopen event");
|
||||
var videosb = ms.addSourceBuffer("video/mp4");
|
||||
|
||||
fetchAndLoad(videosb, 'avc3/init', [''], '.mp4')
|
||||
.then(fetchAndLoad.bind(null, videosb, 'avc3/segment', range(1, 2), '.m4s'))
|
||||
.then(function() {
|
||||
is(videosb.buffered.length, 1, "continuous buffered range");
|
||||
return once(el, "loadeddata");
|
||||
}).then(function() {
|
||||
ok(true, "got loadeddata");
|
||||
ms.endOfStream();
|
||||
return once(ms, "sourceended");
|
||||
}).then(function() {
|
||||
ok(true, "endOfStream completed");
|
||||
// Now ensure that we can play to the end.
|
||||
el.play();
|
||||
once(el, 'ended').then(SimpleTest.finish.bind(SimpleTest));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче