[Modern Media Controls] Turn media/modern-media-controls/ios-inline-media-controls...
[WebKit-https.git] / LayoutTests / media / video-ended-seek-crash.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <title>video-ended-seek-crash</title>
5     <script src="video-test.js"></script>
6     <script src="media-file.js"></script>
7     <script>
8         function startTest()
9         {
10             findMediaElement();
11             waitForEventOnce('canplaythrough', canPlayThrough);
12             video.src = findMediaFile('video', 'content/test');
13         }
14
15         function canPlayThrough()
16         {
17             waitForEventOnce('ended', ended);
18             run('video.currentTime = video.duration - 0.1');
19             run('video.play()');
20         }
21
22         function ended()
23         {
24             waitForEventOnce('seeked', seekedToBeginning);
25             run('video.setAttribute("loop", "loop")');
26             run('video.currentTime = 0');
27             run('video.play()');
28         }
29
30         function seekedToBeginning()
31         {
32             endTest();
33         }
34     </script>
35 </head>
36 <body onload="startTest()">
37     <video controls></video>
38 </body>
39 </html>