blob: e57a9ac3382af3f9feaf97c3ee6d745386bf0c09 [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 = 3;
function trackLoaded()
{
numberOfTracksLoaded++;
if (numberOfTracksLoaded == numberOfTrackTests) {
testTrack(0);
testTrack(1);
testTrackError(2);
}
}
function testTrack(i)
{
findMediaElement();
var expected =
{
length : 4,
tests:
[
{
property : "position",
values : [0, 49.2, 'auto', 100],
precision : 2,
},
],
};
testCues(i, expected);
allTestsEnded();
}
function testTrackError(i)
{
findMediaElement();
var expected =
{
length : 8,
tests:
[
{
property : "position",
values : ['auto', 'auto', 'auto', 'auto', 'auto', 'auto', 'auto', 'auto'],
},
],
};
testCues(i, expected);
allTestsEnded();
}
</script>
</head>
<body onload="enableAllTextTracks()">
<p>Tests cue text position from settings.</p>
<video>
<track src="captions-webvtt/tc015-positioning.vtt" onload="trackLoaded()">
<track src="captions-webvtt/tc015-positioning-ltr.vtt" onload="trackLoaded()">
<track src="captions-webvtt/tc015-positioning-bad.vtt" onload="trackLoaded()">
</video>
</body>
</html>