4 <script src=media-file.js
></script>
5 <script src=video-test.js
></script>
7 function inputFileChanged(e
) {
9 var file
= e
.target
.files
[0];
10 waitForEventAndEnd('loadedmetadata');
11 waitForEventAndFail('error');
12 video
.src
= window
.URL
.createObjectURL(file
);
16 var inputFile
= document
.getElementById('file');
17 var centerX
= inputFile
.offsetLeft
+ inputFile
.offsetWidth
/ 2;
18 var centerY
= inputFile
.offsetTop
+ inputFile
.offsetHeight
/ 2;
19 waitForEvent('change', inputFileChanged
, false, false, inputFile
);
21 if (window
.eventSender
) {
22 eventSender
.beginDragWithFiles([findMediaFile("video", "content/test")]);
23 eventSender
.mouseMoveTo(centerX
, centerY
);
24 eventSender
.mouseUp();
29 <body onload=
"runTest()">
31 This tests the ability of the
<video
> element to load blob URLs. In the browser, select a video file:
32 <input type=
"file" name=
"file" id=
"file">