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

Side by Side Diff: third_party/WebKit/LayoutTests/media/controls/video-controls-overflow-menu-hide-on-click-panel.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", "200"); 17 video.setAttribute("width", "200");
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 playButton = mediaControlsButton(video, "play-button"); 24 var playButton = mediaControlsButton(video, "play-button");
25 var overflowList = getOverflowList(video); 25 var overflowList = getOverflowList(video);
26 var overflowMenu = getOverflowMenuButton(video); 26 var overflowMenu = getOverflowMenuButton(video);
27 27
28 // Clicking on the overflow menu button should make the overflow list visibl e 28 // Clicking on the overflow menu button should make the overflow list visibl e
29 var coords = elementCoordinates(overflowMenu); 29 var coords = elementCoordinates(overflowMenu);
30 clickAtCoordinates(coords[0], coords[1]); 30 clickAtCoordinates(coords[0], coords[1]);
31 assert_not_equals(getComputedStyle(overflowList).display, "none"); 31 assert_not_equals(getComputedStyle(overflowList).display, "none");
32 32
33 // Click on an overflow menu item should close overflow list. 33 // Click on an overflow menu item should close overflow list.
34 var coords = elementCoordinates(playButton); 34 var coords = elementCoordinates(playButton);
35 clickAtCoordinates(coords[0], coords[1]); 35 clickAtCoordinates(coords[0], coords[1]);
36 assert_equals(getComputedStyle(overflowList).display, "none"); 36 assert_equals(getComputedStyle(overflowList).display, "none");
37 }); 37 });
38 }); 38 });
39 </script> 39 </script>
40 </body> 40 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698