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

Unified Diff: third_party/WebKit/LayoutTests/media/video-controls-labels.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-labels.html
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-labels.html b/third_party/WebKit/LayoutTests/media/video-controls-labels.html
new file mode 100644
index 0000000000000000000000000000000000000000..697eae15a60117125e0e8d80b0489198ba890de7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/video-controls-labels.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Tests the labels shown when partial information is provided.</title>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="media-controls.js"></script>
+<script src="media-file.js"></script>
+<video controls>
+ <track kind="subtitles" src="captions.vtt" srclang="is" label="Icelandic">
+ <track kind="subtitles" src="captions-fast.vtt" srclang="fr" label="">
+ <track kind="subtitles" src="captions-rtl.vtt" srclang="" label="">
+</video>
+<script>
+async_test(function(t) {
+ var video = document.querySelector("video");
+
+ video.oncanplaythrough = t.step_func_done(function() {
+ clickCaptionButton(video);
+
+ // Get the menu that displays the list of text tracks.
+ var captionsList = mediaControlsElement(internals.shadowRoot(video).firstChild,
+ "-internal-media-controls-text-track-list");
+
+ assert_equals(captionsList.children[0].innerText, "Off");
+ assert_equals(captionsList.children[1].innerText, "Icelandic");
+ assert_equals(captionsList.children[2].innerText, "fr");
+ assert_equals(captionsList.children[3].innerText, "Track 3");
+ });
+
+ video.src = findMediaFile("video", "content/counting");
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698