OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <title>Test visibiblity of controls when focusing of <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 (<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; | |
acolwell GONE FROM CHROMIUM
2014/05/23 18:26:28
I think we should make this a constant in media-co
| |
14 | |
15 document.querySelector("video").addEventListener("timeupdate", function(event) | |
16 { | |
17 var video = event.target; | |
18 if (video.currentTime < 4 || waitingForFade) | |
19 return; | |
20 controls = mediaControlsButton(video, "panel"); | |
21 | |
22 testExpected("getComputedStyle(controls).opacity", 0); | |
23 | |
24 video.focus(); | |
25 | |
26 waitingForFade = true; | |
27 setTimeout(function() { | |
28 testExpected("getComputedStyle(controls).opacity", 1); | |
29 | |
30 consoleWrite(""); | |
31 endTest(); | |
32 }, fadeinTime); | |
33 }); | |
34 | |
35 </script> | |
OLD | NEW |