OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>VideoTrack properties read from input stream metadata</title> | 4 <title>VideoTrack properties read from input stream metadata</title> |
5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
7 <script src="../media-file.js"></script> | 7 <script src="../media-file.js"></script> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <div id="log"></div> | |
11 <script> | 10 <script> |
12 async_test(function(t) | 11 async_test(function(t) |
13 { | 12 { |
14 var e = document.createElement("video"); | 13 var video = document.createElement("video"); |
15 e.src = "../content/test.webm"; | 14 video.src = "../content/test.webm"; |
16 | 15 |
17 e.onloadedmetadata = t.step_func_done(function() | 16 video.onloadedmetadata = t.step_func_done(function() |
18 { | 17 { |
19 assert_equals(e.videoTracks.length, 1, "videoTracks.length")
; | 18 assert_equals(video.videoTracks.length, 1, "videoTracks.leng
th"); |
20 assert_true(e.videoTracks[0].selected, "videoTrack.selected"
); | 19 assert_true(video.videoTracks[0].selected, "videoTrack.selec
ted"); |
21 assert_equals(e.videoTracks[0].id, "1", "videoTrack.id"); | 20 assert_equals(video.videoTracks[0].id, "1", "videoTrack.id")
; |
22 assert_equals(e.videoTracks[0].kind, "main", "videoTrack.kin
d"); | 21 assert_equals(video.videoTracks[0].kind, "main", "videoTrack
.kind"); |
23 assert_equals(e.videoTracks[0].label, "", "videoTrack.label"
); | 22 assert_equals(video.videoTracks[0].label, "", "videoTrack.la
bel"); |
24 assert_equals(e.videoTracks[0].language, "", "videoTrack.lan
guage"); | 23 assert_equals(video.videoTracks[0].language, "", "videoTrack
.language"); |
25 }); | 24 }); |
26 }); | 25 }); |
27 </script> | 26 </script> |
28 </body> | 27 </body> |
29 </html> | 28 </html> |
OLD | NEW |