Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / video-seek-to-duration.html
blobfac710afed871dc011f958382807b4559096cfc6
1 <html>
2 <head>
3 <script src=../../media-resources/media-file.js></script>
4 <script src=../../media-resources/video-test.js></script>
5 <script>
6 function start()
8 findMediaElement();
10 waitForEvent('durationchange');
11 waitForEvent('loadedmetadata');
12 waitForEventOnce('loadeddata', function ()
14 waitForEvent('seeking', function ()
16 testExpected('video.seeking', true, '==');
17 testExpected('video.ended', true, '==');
18 testExpected('video.currentTime == video.duration', true, '==');
19 testExpected('video.paused', false, '==');
21 waitForEventOnce('timeupdate', function()
23 testExpected('video.seeking', false, '==');
24 testExpected('video.ended', true, '==');
25 testExpected('video.currentTime == video.duration', true, '==');
26 });
27 });
29 waitForEvent('seeked', function ()
31 testExpected('video.seeking', false, '==');
32 testExpected('video.ended', true, '==');
33 testExpected('video.currentTime == video.duration', true, '==');
35 });
37 waitForEvent('pause', function()
39 testExpected('video.paused', true, '==');
40 testExpected('video.seeking', false, '==');
41 testExpected('video.ended', true, '==');
42 testExpected('video.currentTime == video.duration', true, '==');
43 });
45 waitForEvent('ended', function ()
47 testExpected('video.seeking', false, '==');
48 testExpected('video.ended', true, '==');
49 testExpected('video.paused', true, '==');
50 testExpected('video.currentTime == video.duration', true, '==');
51 endTest();
52 });
54 // Seek to the duration of the media
55 testExpected('video.currentTime < video.duration', true, '==');
56 testExpected('video.ended', false, '==');
57 testExpected('video.paused', false, '==');
58 consoleWrite('Starting seek to duration by setting video.currentTime to video.duration');
59 video.currentTime = video.duration;
60 testExpected('video.currentTime == video.duration', true, '==');
61 testExpected('video.seeking', true, '==');
62 testExpected('video.ended', true, '==');
63 });
65 var mediaFile = findMediaFile('video', 'resources/test');
66 video.src = '/' + mediaFile;
67 run('video.play()');
69 </script>
70 </head>
71 <body onload="start()">
72 <video></video>
73 <p>Test event dispatches and attribute changes for seek to duration</p>
74 </body>
75 </html>