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

Side by Side Diff: third_party/WebKit/LayoutTests/media/video-durationchange-on-ended.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 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
5 (Please avoid writing new tests using video-test.js) -->
4 <script src=video-test.js></script> 6 <script src=video-test.js></script>
5 </head> 7 </head>
6 <body> 8 <body>
7 <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>
8 <script> 10 <script>
9 var initialReportedDuration = -1; 11 var initialReportedDuration = -1;
10 12
11 video = document.createElement('video'); 13 video = document.createElement('video');
12 document.body.appendChild(video); 14 document.body.appendChild(video);
13 video.src = "content/truncated.webm"; 15 video.src = "content/truncated.webm";
14 video.play(); 16 video.play();
15 waitForEvent('durationchange', function() { 17 waitForEvent('durationchange', function() {
16 // Note the initial reported duration 18 // Note the initial reported duration
17 if (initialReportedDuration == -1) 19 if (initialReportedDuration == -1)
18 initialReportedDuration = video.duration; 20 initialReportedDuration = video.duration;
19 }); 21 });
20 22
21 waitForEventAndEnd('ended', function() { 23 waitForEventAndEnd('ended', function() {
22 // Verify that the actual duration is less than 24 // Verify that the actual duration is less than
23 // the initial reported duration 25 // the initial reported duration
24 testExpected("video.duration < initialReportedDuration", true); 26 testExpected("video.duration < initialReportedDuration", true);
25 }); 27 });
26 </script> 28 </script>
27 </body> 29 </body>
28 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698