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

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

Issue 297783004: Implement heuristic for showing media controls during playback w/o a mouse (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase; Remove shouldShowMediaControls; Add simple test. 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <title>Test visibiblity of controls when focusing of &lt;video></title>
4 <script src=video-test.js></script>
5 <script src=media-controls.js></script>
6 <p>
7 Test that video controls re-appear when the media (&lt;video>) element is focuse d.
8 </p>
9 <video controls autoplay src="content/test.ogv"></video>
10 <script>
11 var controls;
12 var waitingForFade = false;
13 var fadeinTime = 300;
14
15 document.querySelector("video").addEventListener("timeupdate", function(event) {
philipj_slow 2014/05/23 13:22:43 The { should go on a new line after function in te
fs 2014/05/23 14:39:30 I thought these were off the hook since they're "a
16 var video = event.target;
17 if (video.currentTime < 4 || waitingForFade)
18 return;
19 controls = mediaControlsButton(video, "panel");
20
21 testExpected("getComputedStyle(controls).opacity", 0);
22
23 video.focus();
24
25 waitingForFade = true;
26 setTimeout(function() {
27 testExpected("waitingForFade", true);
philipj_slow 2014/05/23 13:22:43 This looks a bit on the paranoid side :)
fs 2014/05/23 14:39:30 Dropped.
28 testExpected("getComputedStyle(controls).opacity", 1);
29
30 consoleWrite("");
31 endTest();
32 }, fadeinTime);
33 });
34
35 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/video-controls-show-on-focus-expected.txt » ('j') | Source/core/html/shadow/MediaControls.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698