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 |
| 5 (Please avoid writing new tests using video-test.js) --> |
4 <script src=video-test.js></script> | 6 <script src=video-test.js></script> |
5 <script src=media-controls.js></script> | 7 <script src=media-controls.js></script> |
6 <p> | 8 <p> |
7 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 |
8 focused and the 'controls' attribute is not set. | 10 focused and the 'controls' attribute is not set. |
9 </p> | 11 </p> |
10 <!-- 'tabindex' makes the video focusable despite it not having controls --> | 12 <!-- 'tabindex' makes the video focusable despite it not having controls --> |
11 <video tabindex="0" autoplay src="content/test.ogv"></video> | 13 <video tabindex="0" autoplay src="content/test.ogv"></video> |
12 <script> | 14 <script> |
13 var controls; | 15 var controls; |
14 var video = document.querySelector("video"); | 16 var video = document.querySelector("video"); |
15 | 17 |
16 video.addEventListener("playing", function() | 18 video.addEventListener("playing", function() |
17 { | 19 { |
18 runAfterHideMediaControlsTimerFired(function() | 20 runAfterHideMediaControlsTimerFired(function() |
19 { | 21 { |
20 controls = mediaControlsButton(video, "panel"); | 22 controls = mediaControlsButton(video, "panel"); |
21 | 23 |
22 video.focus(); | 24 video.focus(); |
23 testExpected("getComputedStyle(controls).opacity", 0); | 25 testExpected("getComputedStyle(controls).opacity", 0); |
24 | 26 |
25 endTest(); | 27 endTest(); |
26 }, video); | 28 }, video); |
27 }); | 29 }); |
28 </script> | 30 </script> |
OLD | NEW |