OLD | NEW |
| 1 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 2 (Please avoid writing new tests using video-test.js) --> |
1 <script src="video-test.js"></script> | 3 <script src="video-test.js"></script> |
2 <script src="media-controls.js"></script> | 4 <script src="media-controls.js"></script> |
3 <body> | 5 <body> |
4 <p> | 6 <p> |
5 This tests that audio controls do not fade out when the audio is playing. | 7 This tests that audio controls do not fade out when the audio is playing. |
6 </p> | 8 </p> |
7 <audio id="audio" controls autoplay src="content/test.oga"></audio> | 9 <audio id="audio" controls autoplay src="content/test.oga"></audio> |
8 <script> | 10 <script> |
9 var controls; | 11 var controls; |
10 | 12 |
11 if (window.testRunner) { | 13 if (window.testRunner) { |
12 testRunner.waitUntilDone(); | 14 testRunner.waitUntilDone(); |
13 testRunner.dumpAsText(); | 15 testRunner.dumpAsText(); |
14 } | 16 } |
15 | 17 |
16 var audio = document.getElementById("audio"); | 18 var audio = document.getElementById("audio"); |
17 audio.addEventListener("playing", function() | 19 audio.addEventListener("playing", function() |
18 { | 20 { |
19 runAfterHideMediaControlsTimerFired(function() | 21 runAfterHideMediaControlsTimerFired(function() |
20 { | 22 { |
21 controls = mediaControlsButton(audio, "panel"); | 23 controls = mediaControlsButton(audio, "panel"); |
22 testExpected("getComputedStyle(controls).opacity", 1); | 24 testExpected("getComputedStyle(controls).opacity", 1); |
23 | 25 |
24 consoleWrite(""); | 26 consoleWrite(""); |
25 endTest(); | 27 endTest(); |
26 }, audio); | 28 }, audio); |
27 }); | 29 }); |
28 </script> | 30 </script> |
29 </body> | 31 </body> |
OLD | NEW |