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

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

Issue 2120783002: Convert video-controls* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/video-controls-dont-show-on-focus-when-disabled-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>Test that video controls don't appear when the media element is focused a nd the "controls" attribute is not set.</title>
3 <title>Test visibiblity of controls when focusing of &lt;video></title> 3 <script src="../resources/testharness.js"></script>
4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 4 <script src="../resources/testharnessreport.js"></script>
5 (Please avoid writing new tests using video-test.js) --> 5 <script src="media-controls.js"></script>
6 <script src=video-test.js></script> 6 <script src="media-file.js"></script>
7 <script src=media-controls.js></script> 7 <!-- "tabindex" makes the video focusable despite it not having controls -->
8 <p> 8 <video tabindex="0"></video>
9 Test that video controls don't appear when the media (&lt;video>) element is
10 focused and the 'controls' attribute is not set.
11 </p>
12 <!-- 'tabindex' makes the video focusable despite it not having controls -->
13 <video tabindex="0" autoplay src="content/test.ogv"></video>
14 <script> 9 <script>
15 var controls; 10 async_test(function(t) {
16 var video = document.querySelector("video"); 11 var video = document.querySelector("video");
17 12
18 video.addEventListener("playing", function() 13 video.onplaying = t.step_func(function() {
19 { 14 runAfterHideMediaControlsTimerFired(t.step_func_done(function() {
20 runAfterHideMediaControlsTimerFired(function() 15 var controls = mediaControlsButton(video, "panel");
21 { 16 video.focus();
22 controls = mediaControlsButton(video, "panel"); 17 assert_equals(getComputedStyle(controls).opacity, "0");
18 }), video);
19 });
23 20
24 video.focus(); 21 video.src = findMediaFile("video", "content/test");
25 testExpected("getComputedStyle(controls).opacity", 0); 22 video.play();
26
27 endTest();
28 }, video);
29 }); 23 });
30 </script> 24 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/video-controls-dont-show-on-focus-when-disabled-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698