|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <head> |
|
4 <title>Test that an audio element that's already playing when controls are attached displays the controls</title> |
|
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
6 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
|
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
8 </head> |
|
9 <body> |
|
10 <p id="display"></p> |
|
11 |
|
12 <div id="content"> |
|
13 <audio id="audio" controls src="audio.ogg"></audio> |
|
14 </div> |
|
15 |
|
16 <pre id="test"> |
|
17 <script class="testbody"> |
|
18 var audio = document.getElementById("audio"); |
|
19 audio.play(); |
|
20 audio.ontimeupdate = function doTest() { |
|
21 ok(audio.getBoundingClientRect().height > 0, |
|
22 "checking audio element height is greater than zero"); |
|
23 audio.ontimeupdate = null; |
|
24 SimpleTest.finish(); |
|
25 } |
|
26 |
|
27 SimpleTest.waitForExplicitFinish(); |
|
28 </script> |
|
29 </pre> |
|
30 </body> |
|
31 </html> |