| 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 <script src=video-test.js></script> | 4 <script src=video-test.js></script> |
| 5 <script src=media-controls.js></script> | 5 <script src=media-controls.js></script> |
| 6 <p> | 6 <p> |
| 7 Test that video controls re-appear when the media (<video>) element is focuse
d. | 7 Test that video controls re-appear when the media (<video>) element is focuse
d. |
| 8 </p> | 8 </p> |
| 9 <video controls autoplay src="content/test.ogv"></video> | 9 <video controls autoplay src="content/test.ogv"></video> |
| 10 <script> | 10 <script> |
| 11 var controls; | 11 var controls; |
| 12 var video = document.querySelector("video"); | 12 var video = document.querySelector("video"); |
| 13 | 13 |
| 14 video.addEventListener("playing", function() | 14 video.addEventListener("playing", function() |
| 15 { | 15 { |
| 16 runAfterControlsHidden(function() | 16 runAfterHideMediaControlsTimerFired(function() |
| 17 { | 17 { |
| 18 controls = mediaControlsButton(video, "panel"); | 18 controls = mediaControlsButton(video, "panel"); |
| 19 | 19 |
| 20 testExpected("getComputedStyle(controls).opacity", 0); | 20 testExpected("getComputedStyle(controls).opacity", 0); |
| 21 | 21 |
| 22 video.focus(); | 22 video.focus(); |
| 23 | 23 |
| 24 setTimeout(function() | 24 setTimeout(function() |
| 25 { | 25 { |
| 26 testExpected("getComputedStyle(controls).opacity", 1); | 26 testExpected("getComputedStyle(controls).opacity", 1); |
| 27 | 27 |
| 28 consoleWrite(""); | 28 consoleWrite(""); |
| 29 endTest(); | 29 endTest(); |
| 30 }, controlsFadeInDurationMs); | 30 }, controlsFadeInDurationMs); |
| 31 }, video); | 31 }, video); |
| 32 }); | 32 }); |
| 33 </script> | 33 </script> |
| OLD | NEW |