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

Unified Diff: LayoutTests/media/track/track-selection-metadata.html

Issue 882993002: Implement automatic text track selection for 'metadata' tracks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test touch-up. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/track/track-selection-metadata.html
diff --git a/LayoutTests/media/track/track-selection-metadata.html b/LayoutTests/media/track/track-selection-metadata.html
new file mode 100644
index 0000000000000000000000000000000000000000..352cabb77780b06bb1ef2518a47dbda31378eb32
--- /dev/null
+++ b/LayoutTests/media/track/track-selection-metadata.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<title>Multiple 'metadata' tracks with 'default'</title>
+<script src=../../resources/testharness.js></script>
+<script src=../../resources/testharnessreport.js></script>
+<video src="../content/test.ogv">
+ <track kind="metadata" src="captions-webvtt/tc005-default-styles.vtt" id="t1">
+ <track kind="metadata" src="captions-webvtt/tc025-class.vtt" default id="t2hidden">
+ <track kind="metadata" src="captions-webvtt/tc005-metadata-area.vtt" id="t3">
+ <track kind="metadata" src="captions-webvtt/tc004-webvtt-file.vtt" default id="t4hidden">
+</video>
+<script>
+async_test(function() {
+ var video = document.querySelector('video');
+ video.onloadstart = this.step_func(function() {
+ var tracks = video.textTracks;
+ assert_equals(tracks.length, 4);
+ for (var i = 0; i < tracks.length; ++i) {
+ assert_equals(tracks[i].kind, 'metadata');
+
+ var trackElement = document.getElementById(tracks[i].id);
+ if (tracks[i].id.indexOf('hidden') != -1) {
+ assert_true(trackElement.default);
+ assert_equals(tracks[i].mode, 'hidden');
+ } else {
+ assert_false(trackElement.default);
+ assert_equals(tracks[i].mode, 'disabled');
+ }
+ }
+ this.done();
+ });
+});
+</script>
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698