Add new access object callback
[framework/web/webkit-efl.git] / LayoutTests / media / controls-after-reload.html
1 <html>
2 <head>
3     <script src=media-file.js></script>
4     <script>
5     var video;
6
7     if (window.testRunner)
8         testRunner.waitUntilDone();
9
10     function finish()
11     {
12         video.removeEventListener("seeked", finish);
13
14         if (window.testRunner)
15             testRunner.notifyDone();
16     }
17
18     function playing()
19     {
20         video.removeEventListener("playing", playing);
21
22         // Ensure that the frame is always the same in pixel result.
23         video.addEventListener("seeked", finish);
24         video.pause();
25         video.currentTime = 0;
26     }
27
28     function canplaythrough()
29     {
30         video.removeEventListener("canplaythrough", canplaythrough);
31
32         video.src = findMediaFile("video", "content/test");
33         video.addEventListener("playing", playing);
34         video.play();
35     }
36
37     function test()
38     {
39         video = document.getElementsByTagName('video')[0];
40         video.addEventListener("canplaythrough", canplaythrough);
41         
42         video.src = findMediaFile("video", "content/counting");
43     }
44     </script>
45 </head>
46 <body onload="test()">
47 <p>Making sure the controller looks ok after a second load().</p>
48 <video controls></video>
49 </body>
50 </html>