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

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

Issue 2334803002: Implementation of media controls download button. (Closed)
Patch Set: fixed tests 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">
11 <video controls></video> 11 <video controls></video>
12 <script> 12 <script>
13 async_test(function(t) { 13 async_test(function(t) {
14 if (window.internals)
15 window.internals.runtimeFlags.mediaControlsDownloadButtonEnabled = true;
14 // Set up video 16 // Set up video
15 var video = document.querySelector("video"); 17 var video = document.querySelector("video");
16 video.src = findMediaFile("video", "content/test"); 18 video.src = findMediaFile("video", "content/test");
17 video.setAttribute("width", "60"); 19 video.setAttribute("width", "60");
18 // Add captions 20 // Add captions
19 var trackElement = document.createElement("track"); 21 var trackElement = document.createElement("track");
20 video.appendChild(trackElement); 22 video.appendChild(trackElement);
21 // Pretend we have a cast device 23 // Pretend we have a cast device
22 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); 24 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true);
23 25
(...skipping 21 matching lines...) Expand all
45 assert_not_equals(getComputedStyle(children[1]).display, "none"); 47 assert_not_equals(getComputedStyle(children[1]).display, "none");
46 48
47 // Removing closed captions hides button in overflow menu 49 // Removing closed captions hides button in overflow menu
48 assert_not_equals(getComputedStyle(children[2]).display, "none"); 50 assert_not_equals(getComputedStyle(children[2]).display, "none");
49 video.removeChild(trackElement); 51 video.removeChild(trackElement);
50 assert_equals(getComputedStyle(children[2]).display, "none"); 52 assert_equals(getComputedStyle(children[2]).display, "none");
51 }); 53 });
52 }); 54 });
53 </script> 55 </script>
54 </body> 56 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698