Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / media / video-seek-to-middle.html
blobc844de16e281af61c80e1338b72b43171405e9a2
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 testCommonAttributes(seekingExpected)
8 testExpected('video.seeking', seekingExpected, '==');
9 testExpected('video.ended', false, '==');
10 testExpected('video.currentTime == (video.duration / 2)', true, '==');
11 testExpected('video.paused', false, '==');
14 function start()
16 findMediaElement();
18 waitForEventAndFail('ended');
20 waitForEvent('durationchange');
21 waitForEvent('loadedmetadata');
22 waitForEventOnce('loadeddata', function ()
24 waitForEvent('seeking', function ()
26 testCommonAttributes(true);
27 waitForEventOnce('timeupdate', function()
29 testCommonAttributes(false);
30 });
31 });
33 waitForEvent('seeked', function ()
35 testCommonAttributes(false);
36 endTest();
37 });
39 // Seek to half the duration of the media
40 testExpected('video.currentTime < video.duration', true, '==');
41 testExpected('video.ended', false, '==');
42 testExpected('video.seeking', false, '==');
43 testExpected('video.paused', false, '==');
44 consoleWrite('Starting seek to middle by setting video.currentTime to video.duration / 2');
45 video.currentTime = video.duration / 2;
46 testCommonAttributes(true);
47 testExpected('video.currentTime < video.duration', true, '==');
48 testExpected('video.currentTime > 0', true, '==');
49 });
51 var mediaFile = findMediaFile('video', 'resources/test');
52 video.src = '/' + mediaFile;
53 run('video.play()');
55 </script>
56 </head>
57 <body onload="start()">
58 <video></video>
59 <p>Test event dispatches and attribute changes for seek to middle</p>
60 </body>
61 </html>