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

Side by Side 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, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Multiple 'metadata' tracks with 'default'</title>
3 <script src=../../resources/testharness.js></script>
4 <script src=../../resources/testharnessreport.js></script>
5 <video src="../content/test.ogv">
6 <track kind="metadata" src="captions-webvtt/tc005-default-styles.vtt" id="t1">
7 <track kind="metadata" src="captions-webvtt/tc025-class.vtt" default id="t2hid den">
8 <track kind="metadata" src="captions-webvtt/tc005-metadata-area.vtt" id="t3">
9 <track kind="metadata" src="captions-webvtt/tc004-webvtt-file.vtt" default id= "t4hidden">
10 </video>
11 <script>
12 async_test(function() {
13 var video = document.querySelector('video');
14 video.onloadstart = this.step_func(function() {
15 var tracks = video.textTracks;
16 assert_equals(tracks.length, 4);
17 for (var i = 0; i < tracks.length; ++i) {
18 assert_equals(tracks[i].kind, 'metadata');
19
20 var trackElement = document.getElementById(tracks[i].id);
21 if (tracks[i].id.indexOf('hidden') != -1) {
22 assert_true(trackElement.default);
23 assert_equals(tracks[i].mode, 'hidden');
24 } else {
25 assert_false(trackElement.default);
26 assert_equals(tracks[i].mode, 'disabled');
27 }
28 }
29 this.done();
30 });
31 });
32 </script>
OLDNEW
« 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