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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Ensure overflow menu buttons are visible when expected.</title> 2 <title>Ensure overflow menu buttons are hidden when resizing.</title>
3 <style>
4 #content {
5 width: 1000px;
6 height: 1000px;
7 }
8 </style>
3 <script src="../resources/testharness.js"></script> 9 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 10 <script src="../resources/testharnessreport.js"></script>
5 <script src="media-controls.js"></script> 11 <script src="media-controls.js"></script>
6 <script src="media-file.js"></script> 12 <script src="media-file.js"></script>
7 <script src="overflow-menu.js"></script> 13 <script src="overflow-menu.js"></script>
8 14
9 <!--Padding ensures the overflow menu is visible for the tests. --> 15 <!--Padding ensures the overflow menu is visible for the tests. -->
10 <body style="padding-top: 200px; padding-left: 100px"> 16 <body style="padding-top: 200px; padding-left: 100px">
11 <video controls></video> 17 <video controls></video>
12 <script> 18 <script>
13 async_test(function(t) { 19 async_test(function(t) {
20 if (window.testRunner)
21 testRunner.useUnfortunateSynchronousResizeMode();
22
14 // Set up video 23 // Set up video
15 var video = document.querySelector("video"); 24 var video = document.querySelector("video");
16 video.src = findMediaFile("video", "content/test"); 25 video.src = findMediaFile("video", "content/test");
17 video.setAttribute("width", "60"); 26 video.setAttribute("width", "60");
18 // Add captions 27 // Add captions
19 var track = video.addTextTrack("captions"); 28 var track = video.addTextTrack("captions");
20 // Pretend we have a cast device 29 // Pretend we have a cast device
21 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); 30 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
22 31
23 video.onloadeddata = t.step_func_done(function() { 32 video.onloadeddata = t.step_func(function() {
24 var overflowList = getOverflowList(video); 33 var overflowList = getOverflowList(video);
25 var overflowMenu = getOverflowMenuButton(video); 34 var overflowMenu = getOverflowMenuButton(video);
26 35
27 // Clicking on the overflow menu button should make the overflow list visibl e 36 // Clicking on the overflow menu button should make the overflow list visibl e
28 var coords = elementCoordinates(overflowMenu); 37 var coords = elementCoordinates(overflowMenu);
29 clickAtCoordinates(coords[0], coords[1]); 38 clickAtCoordinates(coords[0], coords[1]);
30 assert_not_equals(getComputedStyle(overflowList).display, "none"); 39 assert_not_equals(getComputedStyle(overflowList).display, "none");
31 40
32 // Click on an overflow menu item should close overflow list. 41 // Resizing should hide the overflow list.
33 var coords = elementCoordinates(overflowList); 42 window.onresize = t.step_func_done(_ => {
34 clickAtCoordinates(coords[0], coords[1]); 43 assert_equals(getComputedStyle(overflowList).display, "none");
35 assert_equals(getComputedStyle(overflowList).display, "none"); 44 });
45 window.resizeTo(500, 500);
36 }); 46 });
37 }); 47 });
38 </script> 48 </script>
39 </body> 49 </body>
OLDNEW
« 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