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

Side by Side Diff: LayoutTests/media/controls-timeline-with-controller.html

Issue 848853003: Revert of Relanding 'Always notify the MediaPlayer of any seek' patch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/media/controls-timeline-with-controller-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>media controls timeline with MediaController</title> 4 <title>media controls timeline with MediaController</title>
5 <script src="media-file.js"></script> 5 <script src="media-file.js"></script>
6 <script src="media-controls.js"></script> 6 <script src="media-controls.js"></script>
7 <script src="video-test.js"></script> 7 <script src="video-test.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <video controls></video> 10 <video controls></video>
11 <script> 11 <script>
12 findMediaElement(); 12 findMediaElement();
13 video.controller = new MediaController(); 13 video.controller = new MediaController();
14 video.src = findMediaFile("video", "content/test"); 14 video.src = findMediaFile("video", "content/test");
15 waitForEvent("loadedmetadata", function() 15 waitForEvent("loadedmetadata", function()
16 { 16 {
17 testExpected("video.controller.currentTime", 0); 17 testExpected("video.controller.currentTime", 0);
18 testExpected("video.currentTime", 0); 18 testExpected("video.currentTime", 0);
19 // Wait for the seek initiated by the "bringing up to speed"
20 // step to complete.
21 waitForEventOnce('seeked', seeked);
22 });
23
24 var seeked = function() {
25 testExpected("video.seeking", false); 19 testExpected("video.seeking", false);
26 20
27 // click the middle of the timeline 21 // click the middle of the timeline
28 var coords = mediaControlsButtonCoordinates(video, "timeline"); 22 var coords = mediaControlsButtonCoordinates(video, "timeline");
29 eventSender.mouseMoveTo(coords[0], coords[1]); 23 eventSender.mouseMoveTo(coords[0], coords[1]);
30 eventSender.mouseDown(); 24 eventSender.mouseDown();
31 eventSender.mouseUp(); 25 eventSender.mouseUp();
32 26
33 testExpected("video.controller.currentTime / video.controller.du ration", 0.4, '>'); 27 testExpected("video.controller.currentTime / video.controller.du ration", 0.4, '>');
34 testExpected("video.controller.currentTime / video.controller.du ration", 0.6, '<'); 28 testExpected("video.controller.currentTime / video.controller.du ration", 0.6, '<');
35 testExpected("video.currentTime / video.duration", 0.4, '>'); 29 testExpected("video.currentTime / video.duration", 0.4, '>');
36 testExpected("video.currentTime / video.duration", 0.6, '<'); 30 testExpected("video.currentTime / video.duration", 0.6, '<');
37 testExpected("video.seeking", true); 31 testExpected("video.seeking", true);
38 32
39 endTest(); 33 endTest();
40 } 34 });
41 </script> 35 </script>
42 </body> 36 </body>
43 </html> 37 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/controls-timeline-with-controller-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698