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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html

Issue 2243473002: Adding overflow menu to media player (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698