Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / video-duration-known-after-eos.html
blob7f38b51612ddcacb3fc7cffe22bb53e000f8fef8
1 <!DOCTYPE HTML>
3 <html>
4 <head>
5 <title>local video</title>
7 <script src=media-file.js></script>
8 <script src=video-test.js></script>
10 <script>
11 function ended()
13 testExpected("video.duration", 0, '>');
14 endTest();
17 function playing()
19 video.removeEventListener("playing", playing);
20 run("video.currentTime = video.duration - 0.2");
23 function loadedmetadata()
25 video.addEventListener("ended", ended);
26 video.addEventListener("playing", playing);
28 run("video.play()");
31 function start()
33 findMediaElement();
35 video.addEventListener("loadedmetadata", loadedmetadata);
36 video.src = findMediaFile("video", "content/test");
37 consoleWrite("");
40 </script>
41 </head>
42 <body onload="start()">
43 <video controls autobuffer></video>
44 <p>Tests that duration is known after playback ended.</p>
45 </body>
46 </html>