<!DOCTYPE html>
<title>Test that "media" attribute is supported in "source" elements.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<video>
<source src="content/error.mpeg" media="print"></source>
<source src="content/test.mp4"></source>
</video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
video.onloadstart = t.step_func_done(function() {
var url = video.currentSrc;
assert_equals(url.substr(url.lastIndexOf("/media/") + 7), "content/test.mp4");
});
});
</script>