2012-02-03 04:29:44 -08:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Audio controls test</title>
|
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p id="display"></p>
|
|
|
|
|
|
|
|
<div id="content">
|
2012-02-13 16:48:44 -08:00
|
|
|
<audio id="audio" controls preload="auto"></audio>
|
2012-02-03 04:29:44 -08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<pre id="test">
|
|
|
|
<script class="testbody" type="text/javascript">
|
|
|
|
function loadedmetadata(event) {
|
|
|
|
is(event.type, "loadedmetadata", "checking event type");
|
|
|
|
is(audio.clientHeight, "28", "checking height of audio element");
|
|
|
|
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
2012-02-13 16:48:44 -08:00
|
|
|
var audio = document.getElementById("audio");
|
2012-02-03 04:29:44 -08:00
|
|
|
|
2013-06-14 15:13:44 -07:00
|
|
|
SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startTest);
|
|
|
|
function startTest() {
|
|
|
|
// Kick off test once audio has loaded.
|
|
|
|
audio.addEventListener("loadedmetadata", loadedmetadata, false);
|
|
|
|
audio.src = "audio.wav";
|
|
|
|
}
|
2012-02-03 04:29:44 -08:00
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
</script>
|
|
|
|
</pre>
|
|
|
|
</body>
|
|
|
|
</html>
|