summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/media/video-set-rate-from-pause.html
blob: 0f7d53c44f7ac67d9d3535cae375bee2b0cce9d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html>
    <head>
        <script src=media-file.js></script>
        <script src=video-test.js></script>
        <script>
            function init() {
                findMediaElement();
                waitForEvent('canplaythrough', receivedCanPlayThrough);
                video.src = findMediaFile("video", "content/test");
            }

            function receivedCanPlayThrough() {
                waitForEvent('play', receivedPlay);
                video.playbackRate = 0;
                video.play();
            }

            function receivedPlay() {
                waitForEventAndEnd('timeupdate');
                video.playbackRate = 1;
            }    
        </script>
    </head>
    <body onload="init()">
        <video controls></video>
        <p>Test that setting a non-zero rate causes an async timeupdate event.</p>
    </body>
</html>