Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: LayoutTests/media/video-seek-to-current-position.html

Issue 431903003: Always notify the MediaPlayer of any seek. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: nits Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Test that seeking attribute is true immediately after a seek
5 to the current position, and goes back to false when the seek comple tes.</title>
6
7 <script src="media-file.js"></script>
8 <script src="video-test.js"></script>
9 <script>
10 var video;
11 var seekedCount = 0;
12 var seekTime = 1;
13
14 function onload()
15 {
16 video = document.querySelector("video");
17 video.src = findMediaFile("video", "content/test");
18 waitForEventOnce('loadedmetadata', loadedmetadata);
19 waitForEvent('seeking');
20 waitForEvent('seeked', seeked);
21 }
22
23 function loadedmetadata()
24 {
25 run("video.currentTime = seekTime");
26 testExpected("video.seeking", true);
27 consoleWrite("");
28 }
29
30 function seeked()
31 {
32 ++seekedCount;
33 consoleWrite("");
34
35 testExpected("video.seeking", false);
36 testExpected("video.currentTime", seekTime);
37
38 if (seekedCount == 2) {
39 endTest();
40 return;
41 }
42
43 run("video.currentTime = seekTime");
44 testExpected("video.seeking", true);
45
46 consoleWrite("");
47 }
48 </script>
49 </head>
50 <body onload="onload()">
51 <p>Test that seeking attribute is true immediately after a seek
52 to the current position, and goes back to false when the seek completes. </p>
53 <video></video>
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698