1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/content/tests/widgets/test_bug898940.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <title>Test that an audio element that's already playing when controls are attached displays the controls</title> 1.8 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 + <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> 1.10 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.11 +</head> 1.12 +<body> 1.13 +<p id="display"></p> 1.14 + 1.15 +<div id="content"> 1.16 + <audio id="audio" controls src="audio.ogg"></audio> 1.17 +</div> 1.18 + 1.19 +<pre id="test"> 1.20 +<script class="testbody"> 1.21 + var audio = document.getElementById("audio"); 1.22 + audio.play(); 1.23 + audio.ontimeupdate = function doTest() { 1.24 + ok(audio.getBoundingClientRect().height > 0, 1.25 + "checking audio element height is greater than zero"); 1.26 + audio.ontimeupdate = null; 1.27 + SimpleTest.finish(); 1.28 + } 1.29 + 1.30 + SimpleTest.waitForExplicitFinish(); 1.31 +</script> 1.32 +</pre> 1.33 +</body> 1.34 +</html>