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

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

Issue 2846713002: [Media] Added feature flag for new remote playback pipeline (Closed)
Patch Set: Fixed failing layout tests 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Ensure overflow menu buttons are hidden when resizing.</title> 2 <title>Ensure overflow menu buttons are hidden when resizing.</title>
3 <style> 3 <style>
4 #content { 4 #content {
5 width: 1000px; 5 width: 1000px;
6 height: 1000px; 6 height: 1000px;
7 } 7 }
8 </style> 8 </style>
9 <script src="../resources/testharness.js"></script> 9 <script src="../../resources/testharness.js"></script>
10 <script src="../resources/testharnessreport.js"></script> 10 <script src="../../resources/testharnessreport.js"></script>
11 <script src="media-controls.js"></script> 11 <script src="../media-controls.js"></script>
12 <script src="media-file.js"></script> 12 <script src="../media-file.js"></script>
13 <script src="overflow-menu.js"></script> 13 <script src="../overflow-menu.js"></script>
14 14
15 <!--Padding ensures the overflow menu is visible for the tests. --> 15 <!--Padding ensures the overflow menu is visible for the tests. -->
16 <body style="padding-top: 200px; padding-left: 100px"> 16 <body style="padding-top: 200px; padding-left: 100px">
17 <video controls></video> 17 <video controls></video>
18 <script> 18 <script>
19 async_test(function(t) { 19 async_test(function(t) {
20 if (window.testRunner) 20 if (window.testRunner)
21 testRunner.useUnfortunateSynchronousResizeMode(); 21 testRunner.useUnfortunateSynchronousResizeMode();
22 22
23 // Set up video 23 // Set up video
24 var video = document.querySelector("video"); 24 var video = document.querySelector("video");
25 video.src = findMediaFile("video", "content/test"); 25 video.src = findMediaFile("video", "../content/test");
26 video.setAttribute("width", "60"); 26 video.setAttribute("width", "60");
27 // Add captions 27 // Add captions
28 var track = video.addTextTrack("captions"); 28 var track = video.addTextTrack("captions");
29 // Pretend we have a cast device 29 // Pretend we have a cast device
30 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); 30 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
31 31
32 video.onloadeddata = t.step_func(function() { 32 video.onloadeddata = t.step_func(function() {
33 var overflowList = getOverflowList(video); 33 var overflowList = getOverflowList(video);
34 var overflowMenu = getOverflowMenuButton(video); 34 var overflowMenu = getOverflowMenuButton(video);
35 35
36 // 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
37 var coords = elementCoordinates(overflowMenu); 37 var coords = elementCoordinates(overflowMenu);
38 clickAtCoordinates(coords[0], coords[1]); 38 clickAtCoordinates(coords[0], coords[1]);
39 assert_not_equals(getComputedStyle(overflowList).display, "none"); 39 assert_not_equals(getComputedStyle(overflowList).display, "none");
40 40
41 // Resizing should hide the overflow list. 41 // Resizing should hide the overflow list.
42 window.onresize = t.step_func_done(_ => { 42 window.onresize = t.step_func_done(_ => {
43 assert_equals(getComputedStyle(overflowList).display, "none"); 43 assert_equals(getComputedStyle(overflowList).display, "none");
44 }); 44 });
45 window.resizeTo(500, 500); 45 window.resizeTo(500, 500);
46 }); 46 });
47 }); 47 });
48 </script> 48 </script>
49 </body> 49 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698