blob: 4ac19e340920535a246b76e57bdfc4ac5ddf84e1 [file] [log] [blame]
<!DOCTYPE html>
<title>Test that the cue root is not constrained by the controls/overlay.</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>
/* Enforce a max width on the controls enclosure, so
* that it doesn't fill the entire player width.
video::-webkit-media-controls-enclosure {
max-width: 800px;
video {
width: 2000px;
height: 750px;
<track src="captions-webvtt/long-word.vtt" default>
async_test(function(t) {
var video = document.querySelector("video");
video.src = findMediaFile("video", "../content/test");
video.onseeked = t.step_func_done(function() {
// The width of the controls depends on UA style, so verify that our assumption holds.
var controlsContainer = mediaControlsButton(video, "panel");
assert_true(parseFloat(getComputedStyle(controlsContainer).width) <= 800);
var cueRoot = textTrackContainerElement(video);
assert_true(parseFloat(getComputedStyle(cueRoot).width) > 800);
video.currentTime = 2;