OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <title>Test focus movement when controls fade out with a button focused</title> | |
4 <script src=video-test.js></script> | |
5 <script src=media-controls.js></script> | |
6 <p> | |
7 Test that focus moves to the <body>/document when controls fade out with a bu tton focused. | |
8 </p> | |
9 <video controls src="content/test.ogv"></video> | |
10 <script> | |
11 var controls; | |
12 var video = document.querySelector("video"); | |
13 | |
14 video.addEventListener("canplay", function() | |
15 { | |
16 testExpected("document.activeElement", document.body); | |
17 | |
18 var playButton = mediaControlsButton(video, "play-button"); | |
19 playButton.focus(); | |
20 playButton.click(); | |
21 | |
22 testExpected("document.activeElement", video); | |
23 }); | |
24 | |
25 video.addEventListener("timeupdate", function(event) | |
26 { | |
27 var video = event.target; | |
28 if (video.currentTime < 4) | |
acolwell GONE FROM CHROMIUM
2014/05/23 18:26:28
nit: I think we should define a constant in media-
| |
29 return; | |
30 controls = mediaControlsButton(video, "panel"); | |
31 testExpected("getComputedStyle(controls).opacity", 0); | |
32 | |
33 testExpected("document.activeElement", document.body); | |
34 | |
35 consoleWrite(""); | |
36 endTest(); | |
37 }); | |
38 | |
39 </script> | |
OLD | NEW |