OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <head> |
| 4 <title>Audio element src attribute must match src list - positive test</titl
e> |
| 5 <script src='/resources/testharness.js'></script> |
| 6 <script src='/resources/testharnessreport.js'></script> |
| 7 </head> |
| 8 <body> |
| 9 <h1>Audio element src attribute must match src list - positive test</h1> |
| 10 <div id='log'></div> |
| 11 |
| 12 <script> |
| 13 var src_test = async_test("In-policy audio src"); |
| 14 var source_test = async_test("In-policy audio source element"); |
| 15 |
| 16 function media_loaded(t) { |
| 17 t.done(); |
| 18 } |
| 19 |
| 20 function media_error_handler(t) { |
| 21 t.step( function () { |
| 22 assert_unreached("Media error handler should be triggered for non-allo
wed domain."); |
| 23 }); |
| 24 t.done(); |
| 25 } |
| 26 </script> |
| 27 |
| 28 <audio id="audioObject" width="320" height="240" controls |
| 29 onloadeddata="media_loaded(source_test)"> |
| 30 <source id="audioSourceObject" |
| 31 type="audio/mpeg" |
| 32 onerror="media_error_handler(source_test)" |
| 33 src="/media/sound_5.mp3"> |
| 34 </audio> |
| 35 <audio id="audioObject2" width="320" height="240" controls |
| 36 onerror="media_error_handler(src_test)" |
| 37 onloadeddata="media_loaded(src_test)" |
| 38 src="/media/sound_5.mp3"> |
| 39 |
| 40 <script async defer src="../support/checkReport.sub.js?reportExists=false"> |
| 41 </script> |
| 42 |
| 43 </body> |
| 44 </html> |
OLD | NEW |