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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-durationchange-on-ended.html

Issue 2015503002: Move TODO(philipj) to TODO(foolip) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
5 (Please avoid writing new tests using video-test.js) --> 5 (Please avoid writing new tests using video-test.js) -->
6 <script src=video-test.js></script> 6 <script src=video-test.js></script>
7 </head> 7 </head>
8 <body> 8 <body>
9 <p>Verify there is a 'durationchange' event just before 'ended' event if the initially reported duration exceeds the actual data.</p> 9 <p>Verify there is a 'durationchange' event just before 'ended' event if the initially reported duration exceeds the actual data.</p>
10 <script> 10 <script>
11 var initialReportedDuration = -1; 11 var initialReportedDuration = -1;
12 12
13 video = document.createElement('video'); 13 video = document.createElement('video');
14 document.body.appendChild(video); 14 document.body.appendChild(video);
15 video.src = "content/truncated.webm"; 15 video.src = "content/truncated.webm";
16 video.play(); 16 video.play();
17 waitForEvent('durationchange', function() { 17 waitForEvent('durationchange', function() {
18 // Note the initial reported duration 18 // Note the initial reported duration
19 if (initialReportedDuration == -1) 19 if (initialReportedDuration == -1)
20 initialReportedDuration = video.duration; 20 initialReportedDuration = video.duration;
21 }); 21 });
22 22
23 waitForEventAndEnd('ended', function() { 23 waitForEventAndEnd('ended', function() {
24 // Verify that the actual duration is less than 24 // Verify that the actual duration is less than
25 // the initial reported duration 25 // the initial reported duration
26 testExpected("video.duration < initialReportedDuration", true); 26 testExpected("video.duration < initialReportedDuration", true);
27 }); 27 });
28 </script> 28 </script>
29 </body> 29 </body>
30 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698