Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / media / media-controller-time.html
blob177acc6b90bcc1f021b228519a7387ba482760d2
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
7 <script>
8 var controller;
9 var video;
11 function start() {
12 video = document.getElementById('video');
13 run('controller = video.controller');
14 controller.addEventListener('canplaythrough', canplaythrough, true);
15 var src = findMediaFile('video', 'content/test');
16 video.src = src;
19 function canplaythrough() {
20 consoleWrite("EVENT(canplaythrough)");
21 controller.removeEventListener('canplaythrough', canplaythrough, true);
22 run('video.play()');
23 controller.addEventListener('playing', playing, true);
24 run('controller.play()');
27 function playing() {
28 consoleWrite("EVENT(playing)");
29 controller.removeEventListener('playing', playing, true);
30 setTimeout(function () {
31 testExpected("controller.currentTime", 0, ">");
32 endTest();
33 }, 100);
35 </script>
36 </head>
37 <body onload="start()">
38 <video id="video" mediaGroup="group" controls></video>
39 </body>
40 </html>