OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>AudioTrack properties read from input stream metadata</title> | 4 <title>AudioTrack 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("audio"); | 13 var audio = document.createElement("audio"); |
15 e.src = "../content/test.webm"; | 14 audio.src = "../content/test.webm"; |
16 | 15 |
17 e.onloadedmetadata = t.step_func_done(function() | 16 audio.onloadedmetadata = t.step_func_done(function() |
18 { | 17 { |
19 assert_equals(e.audioTracks.length, 1, "audioTracks.length")
; | 18 assert_equals(audio.audioTracks.length, 1, "audioTracks.leng
th"); |
20 assert_true(e.audioTracks[0].enabled, "audioTrack.enabled"); | 19 assert_true(audio.audioTracks[0].enabled, "audioTrack.enable
d"); |
21 assert_equals(e.audioTracks[0].id, "2", "audioTrack.id"); | 20 assert_equals(audio.audioTracks[0].id, "2", "audioTrack.id")
; |
22 assert_equals(e.audioTracks[0].kind, "main", "audioTrack.kin
d"); | 21 assert_equals(audio.audioTracks[0].kind, "main", "audioTrack
.kind"); |
23 assert_equals(e.audioTracks[0].label, "", "audioTrack.label"
); | 22 assert_equals(audio.audioTracks[0].label, "", "audioTrack.la
bel"); |
24 assert_equals(e.audioTracks[0].language, "", "audioTrack.lan
guage"); | 23 assert_equals(audio.audioTracks[0].language, "", "audioTrack
.language"); |
25 }); | 24 }); |
26 }); | 25 }); |
27 </script> | 26 </script> |
28 </body> | 27 </body> |
29 </html> | 28 </html> |
OLD | NEW |