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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-seek-past-end-paused.html

Issue 1715303002: Add TODOs to convert from video-test.js to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug ref Created 4 years, 10 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src=media-file.js></script> 4 <script src=media-file.js></script>
5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
6 (Please avoid writing new tests using video-test.js) -->
5 <script src=video-test.js></script> 7 <script src=video-test.js></script>
6 <script> 8 <script>
7 var timeupdateEventCount = 0; 9 var timeupdateEventCount = 0;
8 10
9 function doSetup() 11 function doSetup()
10 { 12 {
11 findMediaElement(); 13 findMediaElement();
12 waitForEvent('canplaythrough', canPlayThrough); 14 waitForEvent('canplaythrough', canPlayThrough);
13 video.src = findMediaFile('video', 'content/test'); 15 video.src = findMediaFile('video', 'content/test');
14 } 16 }
15 window.addEventListener('load', doSetup, false); 17 window.addEventListener('load', doSetup, false);
16 18
17 function canPlayThrough() 19 function canPlayThrough()
18 { 20 {
19 testExpected("video.paused", true); 21 testExpected("video.paused", true);
20 testExpected("video.ended", false); 22 testExpected("video.ended", false);
21 video.addEventListener('timeupdate', timeUpdate); 23 video.addEventListener('timeupdate', timeUpdate);
22 run("video.play()"); 24 run("video.play()");
23 } 25 }
24 26
25 function timeUpdate() 27 function timeUpdate()
26 { 28 {
27 ++timeupdateEventCount; 29 ++timeupdateEventCount;
28 30
29 // Wait 2 timeupdate events so we are sure the media engine is 31 // Wait 2 timeupdate events so we are sure the media engine is
30 // playing the media. 32 // playing the media.
31 if (timeupdateEventCount == 2) { 33 if (timeupdateEventCount == 2) {
32 consoleWrite(""); 34 consoleWrite("");
33 video.removeEventListener('timeupdate', timeUpdate); 35 video.removeEventListener('timeupdate', timeUpdate);
34 // Make sure time is advancing. 36 // Make sure time is advancing.
(...skipping 26 matching lines...) Expand all
61 timeupdateEventCount = 0; 63 timeupdateEventCount = 0;
62 endTest(); 64 endTest();
63 } 65 }
64 </script> 66 </script>
65 </head> 67 </head>
66 <body> 68 <body>
67 <video controls></video> 69 <video controls></video>
68 <p>Test that seeking a paused video past its end sets currentTime to dur ation and leaves the video paused.</p> 70 <p>Test that seeking a paused video past its end sets currentTime to dur ation and leaves the video paused.</p>
69 </body> 71 </body>
70 </html> 72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698