| Index: LayoutTests/media/media-time-formatting.html
|
| diff --git a/LayoutTests/media/media-time-formatting.html b/LayoutTests/media/media-time-formatting.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..be24daa5755949daab62ba70e5484b4dd6323538
|
| --- /dev/null
|
| +++ b/LayoutTests/media/media-time-formatting.html
|
| @@ -0,0 +1,44 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| + <script src=video-test.js></script>
|
| + <script>
|
| + function toSeconds(h,m,s)
|
| + {
|
| + return (h * 60 + m) * 60 + s;
|
| + }
|
| +
|
| + function runOneSet()
|
| + {
|
| + var times = [
|
| + toSeconds(0,0,1),
|
| + toSeconds(0,0,15),
|
| + toSeconds(0,10,0),
|
| + toSeconds(1,0,0),
|
| + toSeconds(2,0,0)
|
| + ];
|
| +
|
| + for(var timeIndex = 0; timeIndex < times.length; timeIndex++) {
|
| + var time = times[timeIndex];
|
| + for(var durationIndex = 0; durationIndex < times.length; durationIndex++) {
|
| + var duration = times[durationIndex];
|
| + if (!duration || duration >= time)
|
| + consoleWrite("duration: " + duration + " time: " + time + " formatted: "
|
| + + internals.formatChromiumMediaControlsTime(time,duration,false));
|
| + }
|
| + }
|
| + }
|
| +
|
| + function doTest() {
|
| + internals.settings.setNewMediaPlaybackUiEnabled(false);
|
| + runOneSet();
|
| + internals.settings.setNewMediaPlaybackUiEnabled(true);
|
| + runOneSet();
|
| + endTest();
|
| + }
|
| + </script>
|
| +</head>
|
| +<body onload="doTest()">
|
| + <p>Test formatting of times for HTMLMediaElement.</p>
|
| +</body>
|
| +</html>
|
|
|