OLD | NEW |
1 <body> | 1 <!DOCTYPE html> |
2 <video><source></source></video> | 2 <title>Test that a "source" element is not used when "src" attribute is set.</ti
tle> |
3 <script src=media-file.js></script> | 3 <script src="../resources/testharness.js"></script> |
4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 4 <script src="../resources/testharnessreport.js"></script> |
5 (Please avoid writing new tests using video-test.js) --> | 5 <script src="media-file.js"></script> |
6 <script src=video-test.js></script> | 6 <video> |
| 7 <source></source> |
| 8 </video> |
7 <script> | 9 <script> |
| 10 async_test(function(t) { |
| 11 var video = document.querySelector("video"); |
8 var mediaFile = findMediaFile("video", "content/test"); | 12 var mediaFile = findMediaFile("video", "content/test"); |
9 waitForEvent('loadstart', function () { | 13 |
10 testExpected("stripExtension(relativeURL(video.currentSrc))", stripExten
sion(mediaFile)); | 14 video.onloadstart = t.step_func_done(function() { |
11 endTest(); | 15 var url = video.currentSrc; |
12 } ); | 16 assert_equals(url.substr(url.lastIndexOf("/media/")+7), mediaFile); |
13 document.getElementsByTagName('source')[0].src = "content/error.mpeg"; | 17 }); |
14 mediaElement.src = mediaFile; | 18 |
15 </script> | 19 document.querySelector("source").src = "content/error.mpeg"; |
| 20 video.src = mediaFile; |
| 21 }); |
| 22 </script> |
OLD | NEW |