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

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

Issue 692643002: Don't show media controls on "focusin" when controls are disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix whitespace in test expected output Created 6 years, 1 month 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
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-dont-show-on-focus-when-disabled-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 don't appear when the media (&lt;video>) element is
8 focused and the 'controls' attribute is not set.
8 </p> 9 </p>
9 <video controls autoplay src="content/test.ogv"></video> 10 <!-- 'tabindex' makes the video focusable despite it not having controls -->
11 <video tabindex="0" autoplay src="content/test.ogv"></video>
10 <script> 12 <script>
11 var controls; 13 var controls;
12 var video = document.querySelector("video"); 14 var video = document.querySelector("video");
13 15
14 video.addEventListener("playing", function() 16 video.addEventListener("playing", function()
15 { 17 {
16 runAfterHideMediaControlsTimerFired(function() 18 runAfterHideMediaControlsTimerFired(function()
17 { 19 {
18 controls = mediaControlsButton(video, "panel"); 20 controls = mediaControlsButton(video, "panel");
19 21
22 video.focus();
20 testExpected("getComputedStyle(controls).opacity", 0); 23 testExpected("getComputedStyle(controls).opacity", 0);
21 video.focus();
22
23 testExpected("getComputedStyle(controls).opacity", 1);
24
25 // We fade out when focus is lost, so the opacity is still 1
26 video.blur();
27 testExpected("getComputedStyle(controls).opacity", 1);
28 24
29 endTest(); 25 endTest();
30 }, video); 26 }, video);
31 }); 27 });
32 </script> 28 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-dont-show-on-focus-when-disabled-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698