blob: d1b8fe47229aa536a2ef566575e010e19ccef5ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<!DOCTYPE html>
<html>
<title>Test visibiblity of controls when focusing of <video></title>
<!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
(Please avoid writing new tests using video-test.js) -->
<script src=video-test.js></script>
<script src=media-controls.js></script>
<p>
Test that video controls re-appear when the media (<video>) element is focused.
</p>
<video controls autoplay src="content/test.ogv"></video>
<script>
var controls;
var video = document.querySelector("video");
video.addEventListener("playing", function()
{
runAfterHideMediaControlsTimerFired(function()
{
controls = mediaControlsButton(video, "panel");
testExpected("getComputedStyle(controls).opacity", 0);
video.focus();
testExpected("getComputedStyle(controls).opacity", 1);
// We fade out when focus is lost, so the opacity is still 1
video.blur();
testExpected("getComputedStyle(controls).opacity", 1);
endTest();
}, video);
});
</script>
|