Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-controls-focus-movement-on-hide.html
blobd01c491c545a8a4a371ec8084df5f99b1df9880a
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 &lt;body>/document when controls fade out with a button focused.
8 </p>
9 <video controls src="content/test.ogv"></video>
10 <script>
11 var controls;
12 var video = document.querySelector("video");
14 video.addEventListener("canplay", function()
16 testExpected("document.activeElement", document.body);
18 var playButton = mediaControlsButton(video, "play-button");
19 playButton.focus();
20 playButton.click();
22 testExpected("document.activeElement", video);
24 runAfterHideMediaControlsTimerFired(function()
26 controls = mediaControlsButton(video, "panel");
27 testExpected("getComputedStyle(controls).opacity", 0);
29 testExpected("document.activeElement", document.body);
31 consoleWrite("");
32 endTest();
33 }, video);
34 });
36 </script>