blob: bf2ce1cce0390d5453022de3fb7bb8187c6bb61f [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src=media-file.js></script>
<script src=video-test.js></script>
<script>
function inputFileChanged(e) {
findMediaElement();
var file = e.target.files[0];
waitForEventAndEnd('loadedmetadata');
waitForEventAndFail('error');
video.src = window.URL.createObjectURL(file);
}
function runTest() {
var inputFile = document.getElementById('file');
var centerX = inputFile.offsetLeft + inputFile.offsetWidth / 2;
var centerY = inputFile.offsetTop + inputFile.offsetHeight / 2;
waitForEvent('change', inputFileChanged, false, false, inputFile);
if (window.eventSender) {
eventSender.beginDragWithFiles([findMediaFile("video", "content/test")]);
eventSender.mouseMoveTo(centerX, centerY);
eventSender.mouseUp();
}
}
</script>
</head>
<body onload="runTest()">
<div>
This tests the ability of the &lt;video&gt; element to load blob URLs. In the browser, select a video file:
<input type="file" name="file" id="file">
</div>
<video></video>
</body>
</html>