| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>Video track src attribute must match src list - positive test</title> | |
| 5 <script src='/resources/testharness.js'></script> | |
| 6 <script src='/resources/testharnessreport.js'></script> | |
| 7 </head> | |
| 8 <body> | |
| 9 <h1>Video track src attribute must match src list - positive test</h1> | |
| 10 <div id='log'></div> | |
| 11 | |
| 12 <script> | |
| 13 var source_test = async_test("In-policy track element"); | |
| 14 | |
| 15 var trackURL = location.protocol + | |
| 16 "//www." + | |
| 17 location.hostname + | |
| 18 ":" + | |
| 19 location.port + | |
| 20 "/media/foo.vtt"; | |
| 21 | |
| 22 function media_loaded(t) { | |
| 23 t.done(); | |
| 24 } | |
| 25 | |
| 26 function media_error_handler(t) { | |
| 27 t.step( function () { | |
| 28 assert_unreached("Error handler called for allowed track source."); | |
| 29 }); | |
| 30 t.done(); | |
| 31 } | |
| 32 </script> | |
| 33 | |
| 34 <video id="videoObject" width="320" height="240" controls | |
| 35 onloadeddata="media_loaded(source_test)" crossorigin> | |
| 36 <source id="audioSourceObject" | |
| 37 type="audio/mpeg" | |
| 38 src="/media/white.mp4"> | |
| 39 <track id="trackObject" | |
| 40 kind="subtitles" | |
| 41 srclang="en" | |
| 42 label="English" | |
| 43 onerror="media_error_handler(source_test)"> | |
| 44 </video> | |
| 45 <script> | |
| 46 document.getElementById("trackObject").src = trackURL; | |
| 47 </script> | |
| 48 | |
| 49 <script async defer src="../support/checkReport.sub.js?reportExists=false"> | |
| 50 </script> | |
| 51 | |
| 52 </body> | |
| 53 </html> | |
| OLD | NEW |