Initialize Tizen 2.3
[framework/web/webkit-efl.git] / LayoutTests / media / video-seeking.html
1 <video controls></video>
2 <p>Test that seeking attribute is true immediately after a seek,
3  goes back to false when seeking completes, and that a 'seeked' event
4  is fired for each seek
5  </p>
6 <script src=media-file.js></script>
7 <script src=video-test.js></script>
8 <script>
9
10     var seekedCount = 0;
11
12     function seeked()
13     { 
14         ++seekedCount; 
15         consoleWrite("");
16
17         testExpected("video.seeking", false);
18         testExpected("video.currentTime", seekedCount * 0.5);
19         run("video.currentTime = " + (seekedCount + 1) * 0.5);
20         testExpected("video.seeking", true);
21
22         consoleWrite("");
23
24         if (seekedCount == 3)
25             endTest();
26      }
27
28     function canplaythrough() 
29     {
30         run("video.currentTime = 0.5");
31         consoleWrite("");
32     }
33     
34     waitForEvent('waiting' );
35     waitForEvent('seeked', seeked );
36     waitForEvent('canplaythrough', canplaythrough);
37
38     video.src = findMediaFile("video", "content/test");
39 </script>