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

Side by Side Diff: third_party/WebKit/LayoutTests/media/controls/video-controls-overflow-menu-visibility.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 visible when expected.</title> 2 <title>Ensure overflow menu buttons are visible when expected.</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="media-controls.js"></script> 5 <script src="../media-controls.js"></script>
6 <script src="media-file.js"></script> 6 <script src="../media-file.js"></script>
7 <script src="overflow-menu.js"></script> 7 <script src="../overflow-menu.js"></script>
8 8
9 <!--Padding ensures the overflow menu is visible for the tests. --> 9 <!--Padding ensures the overflow menu is visible for the tests. -->
10 <body style="padding-top: 200px; padding-left: 100px"> 10 <body style="padding-top: 200px; padding-left: 100px">
11 <video controls></video> 11 <video controls></video>
12 <script> 12 <script>
13 async_test(function(t) { 13 async_test(function(t) {
14 // Set up video 14 // Set up video
15 var video = document.querySelector("video"); 15 var video = document.querySelector("video");
16 video.src = findMediaFile("video", "content/test"); 16 video.src = findMediaFile("video", "../content/test");
17 video.setAttribute("width", "60"); 17 video.setAttribute("width", "60");
18 // Add captions 18 // Add captions
19 var track = video.addTextTrack("captions"); 19 var track = video.addTextTrack("captions");
20 // Pretend we have a cast device 20 // Pretend we have a cast device
21 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); 21 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
22 22
23 video.onloadeddata = t.step_func_done(function() { 23 video.onloadeddata = t.step_func_done(function() {
24 var overflowList = getOverflowList(video); 24 var overflowList = getOverflowList(video);
25 var overflowMenu = getOverflowMenuButton(video); 25 var overflowMenu = getOverflowMenuButton(video);
26 26
27 // Overflow menu button should be visible 27 // Overflow menu button should be visible
28 assert_not_equals(getComputedStyle(overflowMenu).display, "none"); 28 assert_not_equals(getComputedStyle(overflowMenu).display, "none");
29 29
30 // Overflow list shouldn't be visible until it's clicked on 30 // Overflow list shouldn't be visible until it's clicked on
31 assert_equals(getComputedStyle(overflowList).display, "none"); 31 assert_equals(getComputedStyle(overflowList).display, "none");
32 32
33 // Clicking on the overflow menu button should make the overflow list visibl e 33 // Clicking on the overflow menu button should make the overflow list visibl e
34 var coords = elementCoordinates(overflowMenu); 34 var coords = elementCoordinates(overflowMenu);
35 clickAtCoordinates(coords[0], coords[1]); 35 clickAtCoordinates(coords[0], coords[1]);
36 assert_not_equals(getComputedStyle(overflowList).display, "none"); 36 assert_not_equals(getComputedStyle(overflowList).display, "none");
37 37
38 // Click on the overflow menu button, again. Should close overflow list. 38 // Click on the overflow menu button, again. Should close overflow list.
39 var coords = elementCoordinates(overflowMenu); 39 var coords = elementCoordinates(overflowMenu);
40 clickAtCoordinates(coords[0], coords[1]); 40 clickAtCoordinates(coords[0], coords[1]);
41 assert_equals(getComputedStyle(overflowList).display, "none"); 41 assert_equals(getComputedStyle(overflowList).display, "none");
42 }); 42 });
43 }); 43 });
44 </script> 44 </script>
45 </body> 45 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698