Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-show-on-focus.html

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <title>Test visibiblity of controls when focusing of &lt;video></title> 3 <title>Test visibiblity of controls when focusing of &lt;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 re-appear when the media (&lt;video>) element is focuse d. 9 Test that video controls re-appear when the media (&lt;video>) element is focuse d.
8 </p> 10 </p>
9 <video controls autoplay src="content/test.ogv"></video> 11 <video controls autoplay src="content/test.ogv"></video>
10 <script> 12 <script>
11 var controls; 13 var controls;
12 var video = document.querySelector("video"); 14 var video = document.querySelector("video");
13 15
14 video.addEventListener("playing", function() 16 video.addEventListener("playing", function()
15 { 17 {
16 runAfterHideMediaControlsTimerFired(function() 18 runAfterHideMediaControlsTimerFired(function()
17 { 19 {
18 controls = mediaControlsButton(video, "panel"); 20 controls = mediaControlsButton(video, "panel");
19 21
20 testExpected("getComputedStyle(controls).opacity", 0); 22 testExpected("getComputedStyle(controls).opacity", 0);
21 video.focus(); 23 video.focus();
22 24
23 testExpected("getComputedStyle(controls).opacity", 1); 25 testExpected("getComputedStyle(controls).opacity", 1);
24 26
25 // We fade out when focus is lost, so the opacity is still 1 27 // We fade out when focus is lost, so the opacity is still 1
26 video.blur(); 28 video.blur();
27 testExpected("getComputedStyle(controls).opacity", 1); 29 testExpected("getComputedStyle(controls).opacity", 1);
28 30
29 endTest(); 31 endTest();
30 }, video); 32 }, video);
31 }); 33 });
32 </script> 34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698