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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-updates-appropriately.html

Issue 2301823002: Reordering media controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-controls
Patch Set: addressed comments Created 4 years, 3 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>Overflow menu updates properly.</title> 2 <title>Overflow menu updates properly.</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">
(...skipping 10 matching lines...) Expand all
21 // Pretend we have a cast device 21 // Pretend we have a cast device
22 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); 22 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
23 23
24 video.onloadeddata = t.step_func_done(function() { 24 video.onloadeddata = t.step_func_done(function() {
25 var overflowList = getOverflowList(video); 25 var overflowList = getOverflowList(video);
26 26
27 // Remove cast device and ensure the overflow menu updates as expected 27 // Remove cast device and ensure the overflow menu updates as expected
28 // Cast option in overflow should no longer be visible, but the other 28 // Cast option in overflow should no longer be visible, but the other
29 // options should all be. 29 // options should all be.
30 var buttonsWithoutCast = overflowButtonsCSS; 30 var buttonsWithoutCast = overflowButtonsCSS;
31 buttonsWithoutCast[1] = undefined; 31 buttonsWithoutCast[OverflowMenuButtons.CAST] = undefined;
32 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false); 32 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, false);
33 33
34 var children = overflowList.children; 34 var children = overflowList.children;
35 // Ensure that all of the buttons are visible in the right order 35 // Ensure that all of the buttons are visible in the right order
36 for (var i = 0; i < children.length; i++) { 36 for (var i = 0; i < children.length; i++) {
37 var child = children[i]; 37 var child = children[i];
38 if (buttonsWithoutCast[i]) { 38 if (buttonsWithoutCast[i]) {
39 assert_not_equals(getComputedStyle(child).display, "none"); 39 assert_not_equals(getComputedStyle(child).display, "none");
40 } else { 40 } else {
41 assert_equals(getComputedStyle(child).display, "none"); 41 assert_equals(getComputedStyle(child).display, "none");
42 } 42 }
43 } 43 }
44 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); 44 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
45 assert_not_equals(getComputedStyle(children[1]).display, "none"); 45 assert_not_equals(getComputedStyle(children[OverflowMenuButtons.CAST]).displ ay, "none");
46 46
47 // Removing closed captions hides button in overflow menu 47 // Removing closed captions hides button in overflow menu
48 assert_not_equals(getComputedStyle(children[2]).display, "none"); 48 assert_not_equals(getComputedStyle(children[OverflowMenuButtons.CLOSED_CAPTI ONS]).display, "none");
49 video.removeChild(trackElement); 49 video.removeChild(trackElement);
50 assert_equals(getComputedStyle(children[2]).display, "none"); 50 assert_equals(getComputedStyle(children[OverflowMenuButtons.CLOSED_CAPTIONS] ).display, "none");
51 }); 51 });
52 }); 52 });
53 </script> 53 </script>
54 </body> 54 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698