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

Unified Diff: third_party/WebKit/LayoutTests/media/controls/video-enter-exit-fullscreen-without-hovering-doesnt-show-controls.html

Issue 2873493004: [Media Controls] Prevent flicker when enter/exit fullscreen (Closed)
Patch Set: Add virtual/new-remote-playback-pipeline variants to SlowTests Created 3 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: third_party/WebKit/LayoutTests/media/controls/video-enter-exit-fullscreen-without-hovering-doesnt-show-controls.html
diff --git a/third_party/WebKit/LayoutTests/media/controls/video-enter-exit-fullscreen-without-hovering-doesnt-show-controls.html b/third_party/WebKit/LayoutTests/media/controls/video-enter-exit-fullscreen-without-hovering-doesnt-show-controls.html
new file mode 100644
index 0000000000000000000000000000000000000000..a00d0a28d68ed9f8315c9561d5ecd4139920c460
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/controls/video-enter-exit-fullscreen-without-hovering-doesnt-show-controls.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<title>Tests that video controls are not shown when entering/exiting fullscreen
+without hovering over the controls. Opposite of
+video-enter-exit-fullscreen-while-hovering-shows-controls.html</title>
+<script src="../../fullscreen/full-screen-test.js"></script>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../media-file.js"></script>
+<script src="../media-controls.js"></script>
+
+<video controls></video>
+
+<script>
+async_test(function(t) {
+ var video = document.querySelector("video");
+
+ video.oncanplaythrough = t.step_func(function() {
+ video.oncanplaythrough = null;
+
+ var panel = mediaControlsButton(video, "panel");
+
+ // Move mouse to the play button and start playing the video.
+ clickAtCoordinates(...mediaControlsButtonCoordinates(video, "play-button"));
+
+ assert_equals(getComputedStyle(panel).opacity, "1",
+ "Inline controls should initially show since controls " +
+ "attribute is present");
+
+ // Move mouse away so it no longer hovers over controls/video.
+ eventSender.mouseMoveTo(0, 0);
+
+ runAfterHideMediaControlsTimerFired(t.step_func(function() {
+ assert_equals(getComputedStyle(panel).opacity, "0",
+ "Inline controls should be hidden by timer");
+
+ // Enter fullscreen (without moving the mouse over the controls).
+ runWithKeyDown(function() { video.webkitRequestFullscreen(); });
+ }), video);
+
+ video.onwebkitfullscreenchange = t.step_func(function() {
+ video.onwebkitfullscreenchange = null;
+
+ assert_equals(document.webkitFullscreenElement, video,
+ "Should have entered fullscreen");
+
+ assert_equals(getComputedStyle(panel).opacity, "0",
+ "Fullscreen controls should not show after entering " +
+ "fullscreen since mouse is not hovering over controls");
+
+ setTimeout(t.step_func(function() {
+ // Exit fullscreen (without moving the mouse over the controls).
+ document.webkitExitFullscreen();
+ }), 0);
+
+ video.onwebkitfullscreenchange = t.step_func(function() {
+ assert_equals(document.webkitFullscreenElement, null,
+ "Should have exited fullscreen");
+
+ assert_equals(getComputedStyle(panel).opacity, "0",
+ "Inline controls should not show after exiting " +
+ "fullscreen since mouse is not hovering over controls");
+
+ t.done();
+ });
+ });
+ });
+
+ video.src = findMediaFile("video", "../content/test-25fps");
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698