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

Side by Side Diff: LayoutTests/media/video-controls-show-on-focus.html

Issue 441193003: Hide video controls after touch when hideMediaControlsTimerFired fires. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: /s/TODO/FIXME Created 6 years, 4 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <title>Test visibiblity of controls when focusing of &lt;video></title> 3 <title>Test visibiblity of controls when focusing of &lt;video></title>
4 <script src=video-test.js></script> 4 <script src=video-test.js></script>
5 <script src=media-controls.js></script> 5 <script src=media-controls.js></script>
6 <p> 6 <p>
7 Test that video controls re-appear when the media (&lt;video>) element is focuse d. 7 Test that video controls re-appear when the media (&lt;video>) element is focuse d.
8 </p> 8 </p>
9 <video controls autoplay src="content/test.ogv"></video> 9 <video controls autoplay src="content/test.ogv"></video>
10 <script> 10 <script>
11 var controls; 11 var controls;
12 var video = document.querySelector("video"); 12 var video = document.querySelector("video");
13 13
14 video.addEventListener("playing", function() 14 video.addEventListener("playing", function()
15 { 15 {
16 runAfterControlsHidden(function() 16 runAfterHideMediaControlsTimerFired(function()
17 { 17 {
18 controls = mediaControlsButton(video, "panel"); 18 controls = mediaControlsButton(video, "panel");
19 19
20 testExpected("getComputedStyle(controls).opacity", 0); 20 testExpected("getComputedStyle(controls).opacity", 0);
21 video.focus(); 21 video.focus();
22 22
23 testExpected("getComputedStyle(controls).opacity", 1); 23 testExpected("getComputedStyle(controls).opacity", 1);
24 24
25 // We fade out when focus is lost, so the opacity is still 1 25 // We fade out when focus is lost, so the opacity is still 1
26 video.blur(); 26 video.blur();
27 testExpected("getComputedStyle(controls).opacity", 1); 27 testExpected("getComputedStyle(controls).opacity", 1);
28 28
29 endTest(); 29 endTest();
30 }, video); 30 }, video);
31 }); 31 });
32 </script> 32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698