blob: 27550f01a66b37055db41728acfb16abbb6fa1e8 [file] [log] [blame]
<!DOCTYPE html>
<title>Tests rendering text track cue line with padding set.</title>
<script src="../media-file.js"></script>
<script src="../media-controls.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
video::-webkit-media-text-track-display {
padding: 15px;
}
</style>
<video>
<track src="captions-webvtt/captions-fast.vtt" kind="captions" default>
</video>
<script>
async_test(function(t) {
var video = document.querySelector("video");
video.src = findMediaFile("video", "../content/test");
video.onseeked = t.step_func_done(function() {
var cueContainerElement = textTrackContainerElement(video);
var cueDisplayElement = textTrackDisplayElement(video);
var cueDisplayBottomPoint = cueDisplayElement.offsetTop + cueDisplayElement.offsetHeight;
var cueContainerBottomPoint = cueContainerElement.offsetTop + cueContainerElement.offsetHeight;
// Cue should be displayed entirely within the container.
assert_true(cueDisplayBottomPoint <= cueContainerBottomPoint);
});
video.currentTime = 0.25;
});
</script>