Mypal/dom/browser-element/mochitest/file_browserElement_NoAudio...

32 lines
638 B
HTML

<!DOCTYPE HTML>
<html>
<body>
<script type="application/javascript;version=1.7">
var audio = new Audio();
audio.src = "noaudio.webm";
audio.preload = "none";
audio.loop = true;
function ok(aVal, aMsg) {
alert((!!aVal ? "OK" : "KO") + ", " + aMsg);
}
function runCommands()
{
switch(location.hash) {
case '#play':
audio.play();
ok(true, "Start playing a video without audio track!");
break;
case '#idle':
ok(!audio.paused, "Video is still playing!");
break;
default :
ok(false, "Undefined command!");
}
}
window.addEventListener('hashchange', runCommands);
</script>
</body>
</html>