Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: third_party/WebKit/LayoutTests/media/audio-controls-do-not-fade-out.html

Issue 2004963003: Convert audio-controls* and audio-delete* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 1 <!DOCTYPE html>
2 (Please avoid writing new tests using video-test.js) --> 2 <title>This tests that audio controls do not fade out when the audio is playing. </title>
3 <script src="video-test.js"></script> 3 <script src="media-file.js"></script>
4 <script src="media-controls.js"></script> 4 <script src="media-controls.js"></script>
5 <body> 5 <script src="../resources/testharness.js"></script>
6 <p> 6 <script src="../resources/testharnessreport.js"></script>
7 This tests that audio controls do not fade out when the audio is playing. 7 <audio controls autoplay></audio>
8 </p>
9 <audio id="audio" controls autoplay src="content/test.oga"></audio>
10 <script> 8 <script>
11 var controls; 9 async_test(function(t) {
10 var audio = document.querySelector("audio");
11 audio.src = findMediaFile("audio", "content/test");
12 audio.onplaying = t.step_func(function() {
13 runAfterHideMediaControlsTimerFired(t.step_func_done(controlsTimerFired) , audio);
14 });
12 15
13 if (window.testRunner) { 16 function controlsTimerFired() {
14 testRunner.waitUntilDone(); 17 var controls = mediaControlsButton(audio, "panel");
15 testRunner.dumpAsText(); 18 assert_equals(getComputedStyle(controls).opacity, "1");
16 } 19 }
17 20 });
18 var audio = document.getElementById("audio"); 21 </script>
19 audio.addEventListener("playing", function()
20 {
21 runAfterHideMediaControlsTimerFired(function()
22 {
23 controls = mediaControlsButton(audio, "panel");
24 testExpected("getComputedStyle(controls).opacity", 1);
25
26 consoleWrite("");
27 endTest();
28 }, audio);
29 });
30 </script>
31 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698