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

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

Issue 302603003: Cleanup tests related to controls hiding/fading in/out (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/media/media-controls.js » ('j') | LayoutTests/media/media-controls.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script src="media-controls.js"></script> 1 <script src="media-controls.js"></script>
2 <body> 2 <body>
3 <p> 3 <p>
4 This tests that audio controls do not fade out when the audio is playing. 4 This tests that audio controls do not fade out when the audio is playing.
5 </p> 5 </p>
6 <p id="result"> 6 <p id="result">
7 FAIL: Test did not run. 7 FAIL: Test did not run.
8 </p> 8 </p>
9 <audio id="audio" controls autoplay src="content/test.oga"></audio><br> 9 <audio id="audio" controls autoplay src="content/test.oga"></audio><br>
10 <script> 10 <script>
11 if (window.testRunner) { 11 if (window.testRunner) {
12 testRunner.waitUntilDone(); 12 testRunner.waitUntilDone();
13 testRunner.dumpAsText(); 13 testRunner.dumpAsText();
14 } 14 }
15 15
16 document.getElementById("audio").addEventListener("timeupdate", function(e) 16 var audio = document.getElementById("audio");
17 audio.addEventListener("playing", function()
17 { 18 {
18 if (e.target.currentTime < 4) { 19 runAfterControlsHidden(function()
19 return; 20 {
20 } 21 var controls = mediaControlsButton(audio, "panel");
21 var controls = mediaControlsElement(internals.shadowRoot(e.target).first Child, "-webkit-media-controls-panel"); 22 var opacity = getComputedStyle(controls).opacity;
22 var opacity = getComputedStyle(controls).opacity; 23 document.getElementById("result").innerText = opacity < 1 ? "FAIL" : "PASS";
philipj_slow 2014/05/26 13:38:47 testExpected("getComputedStyle(controls).opacity",
fs 2014/05/26 15:02:09 Done.
23 document.getElementById("result").innerText = opacity < 1 ? "FAIL" : "PA SS"; 24 testRunner.notifyDone();
24 testRunner.notifyDone(); 25 }, audio);
25 }); 26 });
26 </script> 27 </script>
27 </body> 28 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/media-controls.js » ('j') | LayoutTests/media/media-controls.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698