OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <title>Test visibiblity of controls when focusing of <video></title> | 3 <title>Test visibiblity of controls when focusing of <video></title> |
4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
5 (Please avoid writing new tests using video-test.js) --> | 5 (Please avoid writing new tests using video-test.js) --> |
6 <script src=video-test.js></script> | 6 <script src=video-test.js></script> |
7 <script src=media-controls.js></script> | 7 <script src=media-controls.js></script> |
8 <p> | 8 <p> |
9 Test that video controls don't appear when the media (<video>) element is | 9 Test that video controls don't appear when the media (<video>) element is |
10 focused and the 'controls' attribute is not set. | 10 focused and the 'controls' attribute is not set. |
11 </p> | 11 </p> |
12 <!-- 'tabindex' makes the video focusable despite it not having controls --> | 12 <!-- 'tabindex' makes the video focusable despite it not having controls --> |
13 <video tabindex="0" autoplay src="content/test.ogv"></video> | 13 <video tabindex="0" autoplay src="content/test.ogv"></video> |
14 <script> | 14 <script> |
15 var controls; | 15 var controls; |
16 var video = document.querySelector("video"); | 16 var video = document.querySelector("video"); |
17 | 17 |
18 video.addEventListener("playing", function() | 18 video.addEventListener("playing", function() |
19 { | 19 { |
20 runAfterHideMediaControlsTimerFired(function() | 20 runAfterHideMediaControlsTimerFired(function() |
21 { | 21 { |
22 controls = mediaControlsButton(video, "panel"); | 22 controls = mediaControlsButton(video, "panel"); |
23 | 23 |
24 video.focus(); | 24 video.focus(); |
25 testExpected("getComputedStyle(controls).opacity", 0); | 25 testExpected("getComputedStyle(controls).opacity", 0); |
26 | 26 |
27 endTest(); | 27 endTest(); |
28 }, video); | 28 }, video); |
29 }); | 29 }); |
30 </script> | 30 </script> |
OLD | NEW |