OLD | NEW |
1 <body> | 1 <!DOCTYPE html> |
2 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 2 <title>Test that "media" attribute is ignored in "source" element.</title> |
3 (Please avoid writing new tests using video-test.js) --> | 3 <script src="../resources/testharness.js"></script> |
4 <script src=video-test.js></script> | 4 <script src="../resources/testharnessreport.js"></script> |
| 5 <video> |
| 6 <source src="content/test.mp4" media="print"></source> |
| 7 <source src="content/error.mpeg"></source> |
| 8 </video> |
5 <script> | 9 <script> |
6 waitForEvent('loadstart', function () { | 10 async_test(function(t) { |
7 video = mediaElement = document.getElementsByTagName('video')[0]; | 11 var video = document.querySelector("video"); |
8 testExpected("relativeURL(video.currentSrc)", "content/test.mp4"); | 12 |
9 endTest(); | 13 video.onloadstart = t.step_func_done(function() { |
10 } ); | 14 var url = video.currentSrc; |
11 </script> | 15 assert_equals(url.substr(url.lastIndexOf("/media/") + 7), "content/test.
mp4"); |
12 <video controls> | 16 }); |
13 <!-- the media attribute should be ignored --> | 17 }); |
14 <source src=content/test.mp4 media="print"> | 18 </script> |
15 <source src=content/error.mpeg> | |
16 </video> | |
OLD | NEW |