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

Unified Diff: LayoutTests/media/video-controls-show-on-focus.html

Issue 297783004: Implement heuristic for showing media controls during playback w/o a mouse (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: IgnoreSelfHover -> IgnoreVideoHover; Tweak comment. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/media/video-controls-show-on-focus.html
diff --git a/LayoutTests/media/video-controls-show-on-focus.html b/LayoutTests/media/video-controls-show-on-focus.html
new file mode 100644
index 0000000000000000000000000000000000000000..c6a657a9d7ab12b90984888c31b3558fc9ec01e3
--- /dev/null
+++ b/LayoutTests/media/video-controls-show-on-focus.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<title>Test visibiblity of controls when focusing of &lt;video></title>
+<script src=video-test.js></script>
+<script src=media-controls.js></script>
+<p>
+Test that video controls re-appear when the media (&lt;video>) element is focused.
+</p>
+<video controls autoplay src="content/test.ogv"></video>
+<script>
+var controls;
+var waitingForFade = false;
+var fadeinTime = 300;
acolwell GONE FROM CHROMIUM 2014/05/23 18:26:28 I think we should make this a constant in media-co
+
+document.querySelector("video").addEventListener("timeupdate", function(event)
+{
+ var video = event.target;
+ if (video.currentTime < 4 || waitingForFade)
+ return;
+ controls = mediaControlsButton(video, "panel");
+
+ testExpected("getComputedStyle(controls).opacity", 0);
+
+ video.focus();
+
+ waitingForFade = true;
+ setTimeout(function() {
+ testExpected("getComputedStyle(controls).opacity", 1);
+
+ consoleWrite("");
+ endTest();
+ }, fadeinTime);
+});
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698