blob: f8dbcfdeb84494049700b9393d5f989f9e90fb6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<video controls></video>
<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>
waitForEvent('canplaythrough',
function () {
testException("video.currentTime = -Infinity", '"TypeError: Failed to set the \'currentTime\' property on \'HTMLMediaElement\': The provided double value is non-finite."');
testException("video.currentTime = Infinity", '"TypeError: Failed to set the \'currentTime\' property on \'HTMLMediaElement\': The provided double value is non-finite."');
testException("video.currentTime = NaN", '"TypeError: Failed to set the \'currentTime\' property on \'HTMLMediaElement\': The provided double value is non-finite."');
video.currentTime = 1.5;
testExpected("video.currentTime.toFixed(1)", 1.5);
video.play();
video.currentTime = 3.1;
testExpected("video.currentTime.toFixed(1)", 3.1);
endTest();
});
video.src = findMediaFile("video", "content/test");
</script>
|