blob: 0b860bcb89df0f16fd20d7319d337b9a67e9f42e [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>
numberOfTrackTests = 3;
function trackLoaded()
{
numberOfTracksLoaded++;
if (numberOfTracksLoaded == numberOfTrackTests) {
testTrack(0);
testTrack(1);
testTrackError(2);
}
}
function testTrack(i)
{
findMediaElement();
var expected =
{
length : 4,
tests:
[
{
property : "align",
values : ["start", "center", "end", "center"],
},
],
};
testCues(i, expected);
allTestsEnded();
}
function testTrackError(i)
{
findMediaElement();
var expected =
{
length : 4,
tests:
[
{
property : "align",
values : ["center", "center", "center", "center"],
},
],
};
testCues(i, expected);
allTestsEnded();
}
</script>
</head>
<body onload="enableAllTextTracks()">
<p>Tests cue alignment from settings.</p>
<video>
<track src="captions-webvtt/tc014-alignment.vtt" onload="trackLoaded()">
<track src="captions-webvtt/tc014-alignment-ltr.vtt" onload="trackLoaded()">
<track src="captions-webvtt/tc014-alignment-bad.vtt" onload="trackLoaded()">
</video>
</body>
</html>