| 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>
|
|
|