| OLD | NEW |
| 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; | |
| 16 // Set up video | 14 // Set up video |
| 17 var video = document.querySelector("video"); | 15 var video = document.querySelector("video"); |
| 18 video.src = findMediaFile("video", "content/test"); | 16 video.src = findMediaFile("video", "content/test"); |
| 19 video.setAttribute("width", "60"); | 17 video.setAttribute("width", "60"); |
| 20 // Add captions | 18 // Add captions |
| 21 var trackElement = document.createElement("track"); | 19 var trackElement = document.createElement("track"); |
| 22 video.appendChild(trackElement); | 20 video.appendChild(trackElement); |
| 23 // Pretend we have a cast device | 21 // Pretend we have a cast device |
| 24 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); | 22 internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); |
| 25 | 23 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 47 assert_not_equals(getComputedStyle(children[1]).display, "none"); | 45 assert_not_equals(getComputedStyle(children[1]).display, "none"); |
| 48 | 46 |
| 49 // Removing closed captions hides button in overflow menu | 47 // Removing closed captions hides button in overflow menu |
| 50 assert_not_equals(getComputedStyle(children[2]).display, "none"); | 48 assert_not_equals(getComputedStyle(children[2]).display, "none"); |
| 51 video.removeChild(trackElement); | 49 video.removeChild(trackElement); |
| 52 assert_equals(getComputedStyle(children[2]).display, "none"); | 50 assert_equals(getComputedStyle(children[2]).display, "none"); |
| 53 }); | 51 }); |
| 54 }); | 52 }); |
| 55 </script> | 53 </script> |
| 56 </body> | 54 </body> |
| OLD | NEW |