Bug 898940. Test. r=jaws

--HG--
extra : rebase_source : f046ff1f706875c2188ce3593c45d637ddf5a144
This commit is contained in:
Robert O'Callahan 2013-08-07 15:31:25 +12:00
parent f2aeffa8a9
commit 0c0594a7e4
2 changed files with 32 additions and 0 deletions

View File

@ -38,6 +38,7 @@ MOCHITEST_FILES = \
$(topsrcdir)/browser/base/content/test/audio.ogg \
$(topsrcdir)/content/media/test/seek_with_sound.ogg \
videomask.css \
test_bug898940.html \
$(NULL)
MOCHITEST_CHROME_FILES = \

View File

@ -0,0 +1,31 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test that an audio element that's already playing when controls are attached displays the controls</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">
<audio id="audio" controls src="audio.ogg"></audio>
</div>
<pre id="test">
<script class="testbody">
var audio = document.getElementById("audio");
audio.play();
audio.ontimeupdate = function doTest() {
ok(audio.getBoundingClientRect().height > 0,
"checking audio element height is greater than zero");
audio.ontimeupdate = null;
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>