Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <title>Clicking on the overflow closed captions button shows the closed captions menu.</title> | |
| 3 <script src="../resources/testharness.js"></script> | |
| 4 <script src="../resources/testharnessreport.js"></script> | |
| 5 <script src="media-controls.js"></script> | |
| 6 <script src="media-file.js"></script> | |
| 7 <script src="overflow-menu.js"></script> | |
| 8 | |
| 9 <!--Padding ensures the overflow menu is visible for the tests. --> | |
| 10 <body style="padding: 300px"> | |
|
mlamouri (slow - plz ping)
2016/09/06 10:25:44
If you use padding-top, it would be clearer (same
kdsilva
2016/09/06 17:32:45
Done. Although it looks like we'd need to have it
| |
| 11 <video controls></video> | |
| 12 <script> | |
| 13 async_test(function(t) { | |
| 14 // Set up video | |
| 15 var video = document.querySelector("video"); | |
| 16 video.src = findMediaFile("video", "content/test"); | |
| 17 video.setAttribute("width", "60"); | |
| 18 // Add captions | |
| 19 var track = video.addTextTrack("captions"); | |
| 20 | |
| 21 video.onloadeddata = t.step_func_done(function() { | |
| 22 var overflowList = getOverflowList(video); | |
| 23 var overflowMenu = getOverflowMenuButton(video); | |
| 24 | |
| 25 // Get the menu that displays the list of text tracks | |
| 26 var captionsList = mediaControlsElement(internals.shadowRoot(video).firstChil d, "-internal-media-controls-text-track-list"); | |
| 27 | |
| 28 // Initially the list should not be visible | |
| 29 assert_equals(getComputedStyle(captionsList).display, "none"); | |
| 30 | |
| 31 // Click on the overflow menu button | |
| 32 var coords = elementCoordinates(overflowMenu); | |
| 33 clickAtCoordinates(coords[0], coords[1]); | |
| 34 | |
| 35 // Click on the closed captions button | |
| 36 var coords = elementCoordinates(overflowList.children[OverflowMenuButtons.CL OSED_CAPTIONS]); | |
| 37 clickAtCoordinates(coords[0], coords[1]); | |
| 38 assert_not_equals(getComputedStyle(captionsList).display, "none"); | |
| 39 }); | |
| 40 }); | |
| 41 </script> | |
| 42 </body> | |
| OLD | NEW |