mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1211812 - Mochitest for unencrypted gmp decoding. r=jwwang
This commit is contained in:
parent
cd5ed15a24
commit
5538ed9f57
@ -487,6 +487,8 @@ support-files =
|
||||
short-cenc.mp4
|
||||
sine.webm
|
||||
sine.webm^headers^
|
||||
short.mp4
|
||||
short.mp4^headers^
|
||||
short-video.ogv
|
||||
short-video.ogv^headers^
|
||||
small-shot-mp3.mp4
|
||||
@ -643,6 +645,8 @@ skip-if = toolkit == 'android' || (os == 'win' && !debug) || (os == 'mac' && !de
|
||||
[test_fastSeek.html]
|
||||
skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 914439
|
||||
[test_fastSeek-forwards.html]
|
||||
[test_gmp_playback.html]
|
||||
skip-if = (os != 'win' || os_version == '5.1') # Only gmp-clearkey on Windows Vista and later decodes
|
||||
[test_imagecapture.html]
|
||||
[test_info_leak.html]
|
||||
[test_invalid_reject.html]
|
||||
|
1
dom/media/test/short.mp4^headers^
Normal file
1
dom/media/test/short.mp4^headers^
Normal file
@ -0,0 +1 @@
|
||||
Cache-Control: no-store
|
40
dom/media/test/test_gmp_playback.html
Normal file
40
dom/media/test/test_gmp_playback.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test playback of media files that should play OK</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<script type="text/javascript" src="manifest.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function startTest() {
|
||||
var v = document.createElement("video");
|
||||
ok(v.canPlayType('video/mp4; codecs="avc1.64000d,mp4a.40.2"') != "",
|
||||
"Should be able to play MP4/H.264/AAC via <video> using GMP");
|
||||
v.src = "short.mp4";
|
||||
v.addEventListener("ended", function(event) {
|
||||
ok(true, "Reached end");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
document.body.appendChild(v);
|
||||
v.play();
|
||||
}
|
||||
|
||||
var testPrefs = [
|
||||
['media.fragmented-mp4.gmp.aac', 1], // gmp-clearkey
|
||||
['media.fragmented-mp4.gmp.h264', 1], // gmp-clearkey
|
||||
['media.fragmented-mp4.gmp.enabled', true]
|
||||
];
|
||||
|
||||
SpecialPowers.pushPrefEnv({'set': testPrefs}, startTest);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user