OLD | NEW |
1 <body> | 1 <!DOCTYPE html> |
2 <script src=media-file.js></script> | 2 <title>Test "source" element "type" attribute with "params".</title> |
3 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 3 <script src="../resources/testharness.js"></script> |
4 (Please avoid writing new tests using video-test.js) --> | 4 <script src="../resources/testharnessreport.js"></script> |
5 <script src=video-test.js></script> | 5 <script src="media-file.js"></script> |
6 <script> | 6 <video> |
7 waitForEvent('loadstart', function () { | |
8 video = mediaElement = document.getElementsByTagName('video')[0]; | |
9 testExpected("stripExtension(relativeURL(video.currentSrc))", stripExten
sion(findMediaFile("video", "content/test"))); | |
10 endTest(); | |
11 } ); | |
12 </script> | |
13 <video controls> | |
14 <source src=content/bogus.mpeg type="video/blahblah"> | 7 <source src=content/bogus.mpeg type="video/blahblah"> |
15 <source src=content/test.mp4 type="video/mpeg; codecs="avc1.4D400C"
;"> | 8 <source src=content/test.mp4 type="video/mpeg; codecs="avc1.4D400C"
;"> |
16 <source src=content/test.ogv type="video/ogg; codecs="theora,vorbis&quo
t;"> | 9 <source src=content/test.ogv type="video/ogg; codecs="theora,vorbis&quo
t;"> |
17 <source src=content/error2.mpeg type=video/mpeg> | 10 <source src=content/error2.mpeg type=video/mpeg> |
18 </video> | 11 </video> |
| 12 <script> |
| 13 async_test(function(t) { |
| 14 var video = document.querySelector("video"); |
| 15 |
| 16 video.onloadstart = t.step_func_done(function() { |
| 17 var url = video.currentSrc; |
| 18 assert_equals(url.substr(url.lastIndexOf("/media/") + 7), findMediaFile(
"video", "content/test")); |
| 19 }); |
| 20 }); |
| 21 </script> |
OLD | NEW |