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

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

Issue 2456993003: Improve caption button behavior for video player. (Closed)
Patch Set: Addresss feedback Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html
index 418d70ae2c5259f129e60035a9b848c28238435b..fff2b179ab0ba660506b5b8688b43693e274c6c8 100644
--- a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html
+++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html
@@ -11,28 +11,29 @@
<video controls></video>
<script>
async_test(function(t) {
- // Set up video
+ // Set up video.
var video = document.querySelector("video");
video.src = findMediaFile("video", "content/test");
video.setAttribute("width", "60");
- // Add captions
- var track = video.addTextTrack("captions");
+ // Add two captions.
+ video.addTextTrack("captions");
+ video.addTextTrack("captions");
video.onloadeddata = t.step_func_done(function() {
var overflowList = getOverflowList(video);
var overflowMenu = getOverflowMenuButton(video);
- // Get the menu that displays the list of text tracks
+ // Get the menu that displays the list of text tracks.
var captionsList = mediaControlsElement(internals.shadowRoot(video).firstChild, "-internal-media-controls-text-track-list");
- // Initially the list should not be visible
+ // Initially the list should not be visible.
assert_equals(getComputedStyle(captionsList).display, "none");
- // Click on the overflow menu button
+ // Click on the overflow menu button.
var coords = elementCoordinates(overflowMenu);
clickAtCoordinates(coords[0], coords[1]);
- // Click on the closed captions button
+ // Click on the closed captions button.
var coords = elementCoordinates(overflowList.children[OverflowMenuButtons.CLOSED_CAPTIONS]);
clickAtCoordinates(coords[0], coords[1]);
assert_not_equals(getComputedStyle(captionsList).display, "none");

Powered by Google App Engine
This is Rietveld 408576698