blob: fd54068f7c93a0b7215208698c25293dc790ad5e [file] [log] [blame]
<html>
<head>
<script src=../../media-resources/video-test.js></script>
<script src=../../media-resources/media-file.js></script>
<script>
function loadMediaFrame()
{
findMediaElement();
var movie = findMediaFile('video', 'test');
var type = mimeTypeForExtension(movie.split('.').pop());
var frame = document.createElement('iframe');
frame.width = 0;
frame.height = 0;
frame.addEventListener('load', function () {
source = document.getElementById('source');
source.src = 'http://127.0.0.1:8000/media/resources/video-check-useragent.py?name=' + movie + '&type=' + type;
source.type = type;
waitForEventAndFail('error');
waitForEventAndEnd('canplay');
video.load();
});
frame.src = "data:text/html,<b>test</b>";
document.body.appendChild(frame);
}
</script>
</head>
<body onload="loadMediaFrame()">
<video id="video">
<source id="source">
</video>
<br>
Tests that the media player sends the WebKit User Agent string when requesting a media file.
</body>
</html>