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>
7 Test that focus moves to the
<body
>/document when controls fade out with a button focused.
9 <video controls
src=
"content/test.ogv"></video>
12 var video
= document
.querySelector("video");
14 video
.addEventListener("canplay", function()
16 testExpected("document.activeElement", document
.body
);
18 var playButton
= mediaControlsButton(video
, "play-button");
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
);