blob: 5f9d3ffa3ef324c9ee4728dc407fc12dc1a719a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<html>
<body>
<video controls></video>
<p>Test that setting currentTime changes the time, and that 'ended' event is fired in a reasonable amount of time</p>
<script src=media-file.js></script>
<!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956
(Please avoid writing new tests using video-test.js) -->
<script src=video-test.js></script>
<script>
waitForEventOnce('canplaythrough',
function () {
waitForEventAndEnd('ended');
testExpected("video.currentTime", 0);
run("video.currentTime = video.duration - 0.2");
});
waitForEvent('seeked',
function () {
testExpected("video.currentTime.toFixed(2)", (video.duration - 0.2).toFixed(2));
run("video.play()");
consoleWrite("");
});
video.src = findMediaFile("video", "content/test");
</script>
</body>
</html>
|