blob: afca9a1adeb91683db0d8de415a212d3f784f57e [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 : 3,
tests:
[
{
property : "position",
values : [10, 20, 80],
},
{
property : "align",
values : ["start", "center", "end"],
},
],
};
testCues(i, expected);
allTestsEnded();
}
function testTrackError(i)
{
findMediaElement();
var expected =
{
length : 3,
tests:
[
{
property : "position",
values : [10, 'auto', 'auto'],
},
{
property : "align",
values : ["center", "center", "center"],
},
],
};
testCues(i, expected);
allTestsEnded();
}
</script>
</head>
<body onload="enableAllTextTracks()">
<p>Tests cue text position and alignment from settings.</p>
<video>
<track src="captions-webvtt/tc016-align-positioning.vtt" onload="trackLoaded()">
<track src="captions-webvtt/tc016-align-positioning-bad.vtt" onload="trackLoaded()">
</video>
</body>
</html>