Fix API test after r241728
[WebKit-https.git] / Tools / TestWebKitAPI / Tests / WebKitCocoa / large-video-seek-after-ending.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <script>
5         function seekToBeginningAndFinishTest() {
6             document.querySelector("#test-video").currentTime = 0;
7             // The media controls should be updated on the next runloop.
8             setTimeout(function() {
9                 window.webkit.messageHandlers.testHandler.postMessage("ended");
10             }, 0);
11         }
12
13         function seekToEnd() {
14             document.querySelector("#test-video").currentTime = document.querySelector("#test-video").duration - 0.1;
15         }
16     </script>
17 </head>
18 <body>
19     <video id="test-video" autoplay onended=seekToBeginningAndFinishTest() onplaying=seekToEnd() style="width: 800px; height: 600px;" src="large-video-with-audio.mp4"></video>
20 </body>
21 </html>