| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src=video-test.js></script> |
| 5 <script> |
| 6 function toSeconds(h,m,s) |
| 7 { |
| 8 return (h * 60 + m) * 60 + s; |
| 9 } |
| 10 |
| 11 function runOneSet() |
| 12 { |
| 13 var times = [ |
| 14 toSeconds(0,0,1), |
| 15 toSeconds(0,0,15), |
| 16 toSeconds(0,10,0), |
| 17 toSeconds(1,0,0), |
| 18 toSeconds(2,0,0) |
| 19 ]; |
| 20 |
| 21 for(var timeIndex = 0; timeIndex < times.length; timeIndex++) { |
| 22 var time = times[timeIndex]; |
| 23 for(var durationIndex = 0; durationIndex < times.length; duratio
nIndex++) { |
| 24 var duration = times[durationIndex]; |
| 25 if (!duration || duration >= time) |
| 26 consoleWrite("duration: " + duration + " time: " + time
+ " formatted: " |
| 27 + internals.formatChromiumMediaControlsTime(time,dur
ation,false)); |
| 28 } |
| 29 } |
| 30 } |
| 31 |
| 32 function doTest() { |
| 33 internals.settings.setNewMediaPlaybackUiEnabled(false); |
| 34 runOneSet(); |
| 35 internals.settings.setNewMediaPlaybackUiEnabled(true); |
| 36 runOneSet(); |
| 37 endTest(); |
| 38 } |
| 39 </script> |
| 40 </head> |
| 41 <body onload="doTest()"> |
| 42 <p>Test formatting of times for HTMLMediaElement.</p> |
| 43 </body> |
| 44 </html> |
| OLD | NEW |