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

Unified Diff: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-resize.html

Issue 2417003002: [MediaControl] Hide overflow menu on window resize (Closed)
Patch Set: not polling Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-resize.html
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-click.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-resize.html
similarity index 70%
copy from third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-click.html
copy to third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-resize.html
index a1e7dd610ea6d4201ef281a54e272af7643cd810..e3c6b13c09356bc1e355915599883241ee71891b 100644
--- a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-click.html
+++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-hide-on-resize.html
@@ -1,5 +1,11 @@
<!DOCTYPE html>
-<title>Ensure overflow menu buttons are visible when expected.</title>
+<title>Ensure overflow menu buttons are hidden when resizing.</title>
+<style>
+ #content {
+ width: 1000px;
+ height: 1000px;
+ }
+</style>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="media-controls.js"></script>
@@ -11,6 +17,9 @@
<video controls></video>
<script>
async_test(function(t) {
+ if (window.testRunner)
+ testRunner.useUnfortunateSynchronousResizeMode();
+
// Set up video
var video = document.querySelector("video");
video.src = findMediaFile("video", "content/test");
@@ -20,7 +29,7 @@ async_test(function(t) {
// Pretend we have a cast device
internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
- video.onloadeddata = t.step_func_done(function() {
+ video.onloadeddata = t.step_func(function() {
var overflowList = getOverflowList(video);
var overflowMenu = getOverflowMenuButton(video);
@@ -29,10 +38,11 @@ async_test(function(t) {
clickAtCoordinates(coords[0], coords[1]);
assert_not_equals(getComputedStyle(overflowList).display, "none");
- // Click on an overflow menu item should close overflow list.
- var coords = elementCoordinates(overflowList);
- clickAtCoordinates(coords[0], coords[1]);
- assert_equals(getComputedStyle(overflowList).display, "none");
+ // Resizing should hide the overflow list.
+ window.onresize = t.step_func_done(_ => {
+ assert_equals(getComputedStyle(overflowList).display, "none");
+ });
+ window.resizeTo(500, 500);
});
});
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControlsWindowEventListener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698