Git init
[framework/web/webkit-efl.git] / LayoutTests / media / video-source.html
1 <html>
2     <head>
3         <script src=media-file.js></script>
4         <script src=video-test.js></script>
5         <script>
6
7             function test()
8             {
9                 var panel = document.getElementById("panel");
10                 var mediaFile = findMediaFile("video", "content/test");
11
12                 panel.innerHTML = "<video controls><source src='" + mediaFile + "'></video>";
13
14                 video = mediaElement = document.getElementsByTagName('video')[0];
15                 waitForEvent("loadstart", function () {
16                     testExpected("stripExtension(relativeURL(video.currentSrc))", stripExtension(mediaFile));
17
18                     source = document.querySelector('source');
19                     testExpected("stripExtension(source.getAttribute('src'))", stripExtension(mediaFile));
20                     testExpected("stripExtension(relativeURL(source.src))", stripExtension(mediaFile));
21
22                     endTest();
23                 });
24             }
25         </script>
26     </head>
27
28     <body onload="setTimeout(test, 100)">
29
30     <div id=panel></div>
31
32     </body>
33 </html>