OLD | NEW |
(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> |
OLD | NEW |