blob: 4443aaee66cb55f14f7f63e80cba584c6b8e30a5 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src=../media-file.js></script>
<script src=../video-test.js></script>
<script>
var numberOfTrackTests = 2;
function trackLoaded()
{
numberOfTracksLoaded++;
if (numberOfTracksLoaded == numberOfTrackTests) {
testTrack(0);
testTrackError(1);
}
}
function testTrack(i)
{
findMediaElement();
var expected =
{
length : 7,
tests:
[
{
property : "line",
values : [0, 0, 50.2, 5, 100, -1, 500],
precision : 2,
},
{
property : "snapToLines",
values : [false, true, false, true, false, true, true],
},
],
};
testCues(i, expected);
allTestsEnded();
}
function testTrackError(i)
{
findMediaElement();
var expected =
{
length : 6,
tests:
[
{
property : "line",
values : [-1, -1, -1, -1, -1, -1, -1],
},
{
property : "snapToLines",
values : [true, true, true, true, true, true, true],
},
],
};
testCues(i, expected);
allTestsEnded();
}
</script>
</head>
<body onload="enableAllTextTracks()">
<p>Tests cue line position from settings.</p>
<video>
<track src="captions-webvtt/tc017-line-position.vtt" onload="trackLoaded()">
<track src="captions-webvtt/tc017-line-position-bad.vtt" onload="trackLoaded()">
</video>
</body>
</html>